1 24 package org.riotfamily.forms.element.select; 25 26 import java.util.ArrayList ; 27 import java.util.Collection ; 28 29 30 31 32 33 34 public class SequenceOptionsModel implements OptionsModel { 35 36 private int start = 0; 37 38 private int end = 1; 39 40 private ArrayList options = null; 41 42 public void setStart(int start) { 43 this.start = start; 44 } 45 46 public void setEnd(int end) { 47 this.end = end; 48 } 49 50 public Collection getOptionValues() { 51 if (options == null) { 52 options = new ArrayList (end - start); 53 for (int i = start; i <= end; i++) { 54 options.add(new Integer (i)); 55 } 56 } 57 return options; 58 } 59 } 60 | Popular Tags |