Mercurial > dive4elements > river
changeset 1299:f4f30d758550
Cosmetics (docs).
flys-client/trunk@2923 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 10 Oct 2011 10:46:04 +0000 (2011-10-10) |
parents | b0ed67cb5197 |
children | 6890e1041eac |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java |
diffstat | 2 files changed, 51 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Mon Oct 10 10:02:16 2011 +0000 +++ b/flys-client/ChangeLog Mon Oct 10 10:46:04 2011 +0000 @@ -1,3 +1,8 @@ +2011-10-10 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java: + Polish with doc, removed junk. + 2011-10-10 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java: @@ -6,6 +11,11 @@ * src/main/java/de/intevation/flys/client/client/ui/DatacagePairWidget.java: Extracted RecommendationPairRecord implementation and constats. + * src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java: + Improved displayed strings for selections of pairs. First steps + towards the ability to jump back ("reparameterize") the artifact. + Adjusted to RecommendationPairRecord-extraction. + 2011-10-10 Ingo Weinzierl <ingo@intevation.de> flys/issue375 (ÜSK, Streckemessung)
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java Mon Oct 10 10:02:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java Mon Oct 10 10:46:04 2011 +0000 @@ -15,10 +15,17 @@ /** Second attribute-name for StringPairRecord. */ protected static final String ATTRIBUTE_SECOND = "second"; - + + /** The "first" recommendation (typically the minuend). */ Recommendation first; + + /** The "second" recommendation (typically the subtrahend). */ Recommendation second; + + /** Human-readable short information about the "first" recommendation. */ String firstName; + + /** Human-readable short information about the "second" recommendation. */ String secondName; @@ -26,7 +33,16 @@ } - public RecommendationPairRecord(String firstName, + /** + * Create a new RecommendationPairRecord. + * + * @param firstName Name for the first recommendation (typical minuend). + * @param first The first recommendation (typically the minuend). + * @param secondName Name for the second recommendation (subtrahend). + * @param first The second recommendation (typically the subtrahend). + */ + public RecommendationPairRecord( + String firstName, Recommendation first, String secondName, Recommendation second) @@ -36,6 +52,9 @@ } + /** + * Sets the first recommendation with info (minuend). + */ public void setFirst(Recommendation first, String name) { this.first = first; this.firstName = name; @@ -43,6 +62,9 @@ } + /** + * Sets the second recommendation with info (subtrahend). + */ public void setSecond(Recommendation second, String name) { this.second = second; this.secondName = name; @@ -50,49 +72,38 @@ } + /** + * Get first recommendation (typically the minuend). + * @return first recommendation (typically the minuend). + */ public Recommendation getFirst() { return first; } - + + /** + * Get second recommendation (typically the subtrahend). + * @return second recommendation (typically the subtrahend). + */ public Recommendation getSecond() { return second; } + /** + * Get name of first recommendation (typically the minuend). + * @return name of first recommendation (typically the minuend). + */ public String getFirstName() { return firstName; } + /** + * Get name of second recommendation (typically the subtrahend). + * @return name of second recommendation (typically the subtrahend). + */ public String getSecondName() { return secondName; } - -/* - * public static Recommmendation recommendationfromString(String from, - String factory, String masterArtifactId) - { - String parts = StringUtil.unbracket(from).split(";"); - // TODO proper filter instead of null. - Recommendation r = new Recommendation(factory, parts[0], - masterArtifactId, null); - return r; - } - - public static RecommendationPairRecord[] fromString(String from, - String masterArtifactId) - { - if (from == null) { - return new RecommendationPairRecord[] {}; - } - - //List<RecommendationPairRecord> - String recs = from.split("#"); - for (int i = 0; i < recs.length; i+=2) { - Recommendation minuend = recommendationfromString(recs[i+0], "waterlevel", masterArtifactId); - Recommendation subtrahend = recommendationfromString(recs[i+0], "waterlevel", masterArtifactId); - } - return new RecommendationPairRecord[] {}; - }*/ }