Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java @ 2500:69a498896c9c
Create a link to an online help page and put it in front of the input panels.
flys-client/trunk@4336 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 03 May 2012 06:19:04 +0000 |
parents | c087137a8584 |
children |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java Wed May 02 19:07:23 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java Thu May 03 06:19:04 2012 +0000 @@ -21,6 +21,9 @@ /** The label that should be used to label data objects. */ protected String label; + /** The help text (URL) that should be displayed for this data object. */ + protected String helpText; + /** * The default constructor that creates a new DataList without Data objects @@ -73,6 +76,28 @@ /** + * A constructor that creates a new DataList without Data objects and no + * UIProvider. Size defines the initial size of the list. + * + * @param state The name of the state that this list belongs to. + * @param size The initial size of the list. + * @param uiprovider The UIProvider that should be used to render this list. + * @param label The label. + * @param helpText The help text (should be an URL). + */ + public DataList( + String state, + int size, + String uiprovider, + String label, + String helpText + ) { + this(state, size, uiprovider, label); + this.helpText = helpText; + } + + + /** * Adds a new Data object to the list. * * @param obj The Data object. @@ -163,12 +188,23 @@ } + /** + * Returns the help text which should be an URL. + * + * @return the help text. + */ + public String getHelpText() { + return helpText; + } + + public Object clone() { DataList clone = new DataList( this.state, this.data.size(), this.uiprovider, - this.label); + this.label, + this.helpText); clone.data = (List<Data>) ((ArrayList<Data>)data).clone(); return clone;