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 com.thoughtworks.xstream.annotations.XStreamAlias;
022
023 import java.io.Serializable;
024 import java.util.Collection;
025 import java.util.ArrayList;
026
027 /**
028 * A model object used to represent the title of a chart.
029 *
030 * @author Rakesh 2008-8-10
031 * @version $Id: Title.java 63 2008-08-29 07:46:39Z sptrakesh $
032 */
033 @XStreamAlias( "Title" )
034 public class Title implements Serializable
035 {
036 private static final long serialVersionUID = 1l;
037
038 /**
039 * A collection used to store the lines of text that comprise the title.
040 */
041 private Collection<String> title = new ArrayList<String>();
042
043 /** Default constructor. */
044 public Title() {}
045
046 /**
047 * Create a new instance with the single line title specified.
048 *
049 * @see #add
050 * @param title The single line title to use.
051 */
052 public Title( final String title )
053 {
054 add( title );
055 }
056
057 /**
058 * Add the specified line of text to the title.
059 *
060 * @param line The line of text to add.
061 */
062 public void add( final String line )
063 {
064 title.add( line );
065 }
066 }