001 /*
002 * This file is part of the Echo Point Project. This project is a
003 * collection of Components that have extended the Echo Web Application
004 * Framework Version 3.
005 *
006 * Version: MPL 1.1
007 *
008 * The contents of this file are subject to the Mozilla Public License Version
009 * 1.1 (the "License"); you may not use this file except in compliance with
010 * the License. You may obtain a copy of the License at
011 * http://www.mozilla.org/MPL/
012 *
013 * Software distributed under the License is distributed on an "AS IS" basis,
014 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
015 * for the specific language governing rights and limitations under the
016 * License.
017 */
018
019 package echopoint.google.chart.model;
020
021 import java.util.Collection;
022 import java.util.ArrayList;
023 import java.util.Collections;
024
025 /**
026 * The model object for use with {@link echopoint.google.chart.ScatterPlot}s.
027 *
028 * @author Rakesh Vidyadharan 2008-08-23
029 * @version $Id: ScatterPlotData.java 63 2008-08-29 07:46:39Z sptrakesh $
030 */
031 public class ScatterPlotData<N extends Number> extends ChartData<N>
032 {
033 private static final long serialVersionUID = 1l;
034
035 /**
036 * The collection of values that determines the sizes of the points that
037 * are displayed in the scatter plot.
038 */
039 private Collection<Integer> size = new ArrayList<Integer>();
040
041 /**
042 * Accessor for property 'size'. Returns a read-only view of the data.
043 *
044 * @return Value for property 'size'.
045 */
046 public Collection<Integer> getSize()
047 {
048 return Collections.unmodifiableCollection( size );
049 }
050
051 /**
052 * Mutator for property 'size'. Resets the contents of the collection.
053 *
054 * @param size Value to set for property 'size'.
055 */
056 public void setSize( final Collection<Integer> size )
057 {
058 this.size.clear();
059 this.size.addAll( size );
060 }
061 }