diff flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java @ 52:1d0be51ab93b

The DataList has a label now. flys-client/trunk@1508 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Mar 2011 18:20:05 +0000
parents a2923d63f530
children a7179e3a774e
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java	Thu Mar 17 16:44:51 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DataList.java	Thu Mar 17 18:20:05 2011 +0000
@@ -31,6 +31,12 @@
     }
 
 
+    /**
+     * Constructor.
+     *
+     * @param state The name of the state that this list belongs to.
+     * @param size The initial size of the list.
+     */
     public DataList(String state, int size) {
         this.state = state;
         this.data  = new ArrayList<Data>(size);
@@ -41,7 +47,9 @@
      * 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.
      */
     public DataList(String state, int size, String uiprovider) {
         this(state, size);
@@ -50,6 +58,21 @@
 
 
     /**
+     * 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.
+     */
+    public DataList(String state, int size, String uiprovider, String label) {
+        this(state, size, uiprovider);
+        this.label = label;
+    }
+
+
+    /**
      * Adds a new Data object to the list.
      *
      * @param obj The Data object.
@@ -92,6 +115,15 @@
 
 
     /**
+     * Returns the whole list of Data objects.
+     *
+     * @return the whole list of Data objects.
+     */
+    public List<Data> getAll() {
+        return data;
+    }
+
+    /**
      * Returns the number of Data objects in the list.
      *
      * @param the number of Data objects in the list.

http://dive4elements.wald.intevation.org