Fix some problems in the output of List, MList & TList
[scilab.git] / scilab / modules / types / src / java / org / scilab / modules / types / ScilabTList.java
index 833315d..d7ff5d1 100644 (file)
@@ -26,46 +26,46 @@ public class ScilabTList extends ArrayList<ScilabType> implements ScilabType {
         * Note that the first element of this collection is the header used by
         * Scilab to find each field type.
         */
-    public ScilabTList() {
+       public ScilabTList() {
                super();
-    }
-    
-    /**
-     * Construct a tlist with a specified header.
-     *  
-     * @param types type names of the fields.
-     */
-    public ScilabTList(String []types) {
+       }
+       
+       /**
+        * Construct a tlist with a specified header.
+        *  
+        * @param types type names of the fields.
+        */
+       public ScilabTList(String []types) {
                super();
                String [][] typesData = new String[1][types.length];
                typesData[0] = types;
                add(new ScilabString(typesData));
-    }
+       }
 
        /**
         * Construct a tlist containing the elements of the specified collection, in
         * the order that they are returned by the specified collection's iterator.
         * 
         * @param types
-        *            type names of the fields.
+        *                      type names of the fields.
         * @param c
-        *            the collection whose elements are to be placed into this
-        *            tlist.
+        *                      the collection whose elements are to be placed into this
+        *                      tlist.
+        */
+       public ScilabTList(String[] types, Collection< ? extends ScilabType> c) {
+               super(c.size() + 1);
+               
+               String[][] typesData = new String[1][types.length];
+               typesData[0] = types;
+               add(new ScilabString(typesData));
+               
+               addAll(c);
+       }
+       
+       /**
+        * @return 1 when there is data on the list, 0 otherwise.
+        * @see org.scilab.modules.types.ScilabType#getHeight()
         */
-    public ScilabTList(String[] types, Collection< ? extends ScilabType> c) {
-       super(c.size() + 1);
-       
-       String[][] typesData = new String[1][types.length];
-       typesData[0] = types;
-       add(new ScilabString(typesData));
-       
-       addAll(c);
-    }
-    
-    /**
-     * @return 1 when there is data on the list, 0 otherwise.
-     * @see org.scilab.modules.types.ScilabType#getHeight()
-     */
        public int getHeight() {
                if (isEmpty()) {
                        return 0;
@@ -74,7 +74,7 @@ public class ScilabTList extends ArrayList<ScilabType> implements ScilabType {
        }
 
        /**
-     * @return 1 when there is data on the list, 0 otherwise.
+        * @return 1 when there is data on the list, 0 otherwise.
         * @see org.scilab.modules.types.ScilabType#getWidth()
         */
        public int getWidth() {
@@ -85,6 +85,7 @@ public class ScilabTList extends ArrayList<ScilabType> implements ScilabType {
        }
        
        /**
+        * Display the representation in the Scilab language of the type
         * @return the pretty-printed data
         * @see java.util.AbstractCollection#toString()
         */