Mercurial > dive4elements > river
changeset 1430:6bb6d43eeb2d
Cosmetics.
flys-client/trunk@3383 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 12 Dec 2011 07:23:24 +0000 |
parents | 16b7adc66330 |
children | 987f95ceb623 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java flys-client/src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/server/DistanceInfoServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/shared/model/ArtifactFilter.java flys-client/src/main/java/de/intevation/flys/client/shared/model/Collection.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollection.java |
diffstat | 8 files changed, 65 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- 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 <felix.wolfsteller@intevation.de> + + 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 <raimund.renkert@intevation.de> Added stub for chart property editor.
--- 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 <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> + */ 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<Collection>() {
--- 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 <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ 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()); }
--- 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);
--- 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";
--- 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); }
--- 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();
--- 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<Recommendation> recommendations; + /** + * ThemeList by outputmode name. + */ protected Map<String, ThemeList> 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<CollectionItem>(); - this.themeLists = new HashMap<String, ThemeList>(); + this.uuid = uuid; + this.ttl = ttl; + this.name = name; + this.items = new ArrayList<CollectionItem>(); + this.themeLists = new HashMap<String, ThemeList>(); this.recommendations = new ArrayList<Recommendation>(); } @@ -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);