# HG changeset patch # User Felix Wolfsteller # Date 1323674604 0 # Node ID 6bb6d43eeb2d03b7e4632c2493c4e7f7aae4bb0e # Parent 16b7adc66330c71d027617a2ba45ff474781221c Cosmetics. flys-client/trunk@3383 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/ChangeLog --- a/flys-client/ChangeLog Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/ChangeLog Mon Dec 12 07:23:24 2011 +0000 @@ -1,3 +1,21 @@ +2011-12-12 Felix Wolfsteller + + Cosmetics. + + * src/main/java/de/intevation/flys/client/shared/model/Collection.java, + src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java: + Documentation. + (getLastAccess): Added TODO. Never called, can it be removed? + + * src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.java, + src/main/java/de/intevation/flys/client/server/DistanceInfoServiceImpl.java, + src/main/java/de/intevation/flys/client/shared/model/ArtifactFilter.java, + src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java: + Minor Cosmetics. + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java: + Minor refactoring, extracted createLayout. + 2011-12-09 Raimund Renkert Added stub for chart property editor. diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java Mon Dec 12 07:23:24 2011 +0000 @@ -43,7 +43,12 @@ import de.intevation.flys.client.client.services.CollectionItemAttributeService; import de.intevation.flys.client.client.services.CollectionItemAttributeServiceAsync; - +/** + * ThemePanel on the left in CollectionView. + * Contains control widgets for "themes", which are plotted in a diagram (chart). + * + * @author Ingo Weinzierl + */ public abstract class ThemePanel extends Canvas implements OnMoveHandler, @@ -243,11 +248,13 @@ } + /** Adds given Record to the list (table). */ protected void addFacetRecord(FacetRecord rec) { list.addData(rec); } + /** Create a FacetRecord that wraps given theme. */ protected FacetRecord createRecord(Theme theme) { return new FacetRecord(theme); } @@ -265,7 +272,7 @@ GWT.log("ThemePanel.updateCollection via RPC now"); - // don't forget to enable the panel after the request has finished! + // Don't forget to enable the panel after the request has finished! disable(); updater.update(collection, loc, new AsyncCallback() { diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java Mon Dec 12 07:23:24 2011 +0000 @@ -17,6 +17,9 @@ import de.intevation.flys.client.client.services.FeedServiceAsync; /** + * ThemePanel on the left in CollectionView. + * Contains control widgets for "themes", which are plotted in a diagram (chart). + * * @author Ingo Weinzierl */ public class ChartThemePanel extends ThemePanel { @@ -45,6 +48,17 @@ } + protected VLayout createLayout() { + VLayout layout = new VLayout(); + layout.setWidth100(); + layout.setHeight100(); + + layout.addMember(list); + layout.addMember(navigation); + + return layout; + } + /** * Initializes the layout of this panel. */ @@ -52,14 +66,7 @@ setWidth100(); setHeight100(); - VLayout layout = new VLayout(); - layout.setWidth100(); - layout.setHeight100(); - - layout.addMember(list); - layout.addMember(navigation); - - addChild(layout); + addChild(createLayout()); } diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.java Mon Dec 12 07:23:24 2011 +0000 @@ -56,7 +56,7 @@ String url = getServletContext().getInitParameter("server-url"); - Document create = + Document create = ClientProtocolUtils.newCreateCollectionDocument(null); HttpClient client = new HttpClientImpl(url, locale); diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/server/DistanceInfoServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/DistanceInfoServiceImpl.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/DistanceInfoServiceImpl.java Mon Dec 12 07:23:24 2011 +0000 @@ -34,7 +34,6 @@ private static final Logger logger = Logger.getLogger(DistanceInfoServiceImpl.class); - public static final String ERROR_NO_DISTANCEINFO_FOUND = "error_no_distanceinfo_found"; diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactFilter.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactFilter.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactFilter.java Mon Dec 12 07:23:24 2011 +0000 @@ -31,7 +31,6 @@ } public void add(String out, String name, String num) { - if (out == null) { out = ToLoad.uniqueKey(outFilters); } diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java Mon Dec 12 07:23:24 2011 +0000 @@ -21,6 +21,7 @@ public Date getCreationTime(); + /** TODO never called, trivial implementation. Can be removed? */ public Date getLastAccess(); public long getTTL(); diff -r 16b7adc66330 -r 6bb6d43eeb2d flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Fri Dec 09 14:45:53 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java Mon Dec 12 07:23:24 2011 +0000 @@ -17,14 +17,16 @@ /** The uuid of the collection. */ protected String uuid; - /** The name of the collection.*/ + /** The name of the collection. */ protected String name; - /** The creation time of this collection.*/ + /** The creation time of this collection. */ protected Date creation; - /** The time to live of the collection. If this value is 0, it will never - * die.*/ + /** + * The time to live of the collection. + * If this value is 0, it will never die. + */ protected long ttl; /** The list of artifacts that are managed by this Collection.*/ @@ -32,6 +34,9 @@ protected List recommendations; + /** + * ThemeList by outputmode name. + */ protected Map themeLists; @@ -43,11 +48,11 @@ public DefaultCollection(String uuid, long ttl, String name) { - this.uuid = uuid; - this.ttl = ttl; - this.name = name; - this.items = new ArrayList(); - this.themeLists = new HashMap(); + this.uuid = uuid; + this.ttl = ttl; + this.name = name; + this.items = new ArrayList(); + this.themeLists = new HashMap(); this.recommendations = new ArrayList(); } @@ -105,6 +110,10 @@ } + /** + * Returns now. + * TODO candidate for removal? + */ public Date getLastAccess() { return new Date(); } @@ -172,6 +181,9 @@ } + /** + * Returns ThemeList for given output name. + */ public ThemeList getThemeList(String outName) { if (themeLists != null) { return themeLists.get(outName);