# HG changeset patch # User Felix Wolfsteller # Date 1318243564 0 # Node ID f4f30d758550797f99a140e355569c002a731405 # Parent b0ed67cb5197b63f773f6e9db58d84087a169068 Cosmetics (docs). flys-client/trunk@2923 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r b0ed67cb5197 -r f4f30d758550 flys-client/ChangeLog --- 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 + + * src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java: + Polish with doc, removed junk. + 2011-10-10 Felix Wolfsteller * 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 flys/issue375 (ÜSK, Streckemessung) diff -r b0ed67cb5197 -r f4f30d758550 flys-client/src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java --- 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 - 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[] {}; - }*/ }