1 18 19 package org.apache.struts.webapp.tiles.portal; 20 21 import java.util.ArrayList ; 22 import java.util.List ; 23 24 27 public class PortalSettings 28 { 29 30 protected int numCols; 31 32 protected List lists = new ArrayList (); 33 34 37 public int getNumCols() 38 { 39 return numCols; 40 } 41 44 public void setNumCols( String numCols ) 45 { 46 setNumCols( Integer.parseInt(numCols) ); 47 } 48 52 public void setNumCols( int numCols ) 53 { 54 this.numCols = numCols; 55 } 56 59 public List getListAt( int index ) 60 { 61 return (List )lists.get(index); 62 } 63 64 67 public void addList( List list ) 68 { 69 lists.add( list); 70 } 71 72 79 public void setListAt( int index, List list ) 80 { 81 while( index>lists.size() ) lists.add(new ArrayList ()); 83 lists.add( index, list); 84 } 85 86 89 public void reset() 90 { 91 numCols = 0; 92 lists.clear(); 93 } 94 95 public String toString() 96 { 97 return "colCount=" + numCols 98 + " , lists=" + lists; 99 } 100 } 101 | Popular Tags |