Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/RecommendationPairRecord.java @ 1302:17e7d5e437fb
Bumped OpenLayers to version 2.11 and GWT-OpenLayers to version 0.6
flys-client/trunk@2930 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 10 Oct 2011 15:29:39 +0000 |
parents | f4f30d758550 |
children | 18b0414bde44 |
line wrap: on
line source
package de.intevation.flys.client.client.ui; import com.smartgwt.client.widgets.grid.ListGridRecord; import de.intevation.flys.client.shared.model.Recommendation; /** * Two strings to be displayed in a GridList, derived from two * Recommendations. */ public class RecommendationPairRecord extends ListGridRecord { /** First attribute-name for StringPairRecord. */ protected static final String ATTRIBUTE_FIRST = "first"; /** 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; public RecommendationPairRecord() { } /** * 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) { setFirst(first, firstName); setSecond(second, secondName); } /** * Sets the first recommendation with info (minuend). */ public void setFirst(Recommendation first, String name) { this.first = first; this.firstName = name; setAttribute(ATTRIBUTE_FIRST, name); } /** * Sets the second recommendation with info (subtrahend). */ public void setSecond(Recommendation second, String name) { this.second = second; this.secondName = name; setAttribute(ATTRIBUTE_SECOND, name); } /** * 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; } }