1 19 package jcckit.data; 20 21 import jcckit.util.ConfigParameters; 22 23 import java.util.StringTokenizer ; 24 25 30 public class DataPlot extends DataContainer { 31 32 public static final String CURVES_KEY = "curves", 33 DATA_KEY = "data"; 34 35 36 public DataPlot() {} 37 38 50 public DataPlot(ConfigParameters config) { 51 StringTokenizer tokenizer = new StringTokenizer (config.get(CURVES_KEY)); 52 while (tokenizer.hasMoreTokens()) { 53 addElement(new DataCurve(config.getNode(tokenizer.nextToken()))); 54 } 55 } 56 57 62 public static DataPlot create(ConfigParameters config) { 63 return new DataPlot(config.getNode(DATA_KEY)); 64 } 65 66 70 protected boolean isValid(DataElement element) { 71 return element instanceof DataCurve; 72 } 73 } 74 75 | Popular Tags |