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.io.Serializable;
022    
023    /**
024     * A simple model object that represents the data for a {@link
025     * echopoint.google.chart.VennDiagram}.  This bean is purely for convenience since
026     * the data may be set similar to regular charts.
027     *
028     * @author Rakesh Vidyadharan 2008-08-22
029     * @version $Id: VennDiagramModel.java 63 2008-08-29 07:46:39Z sptrakesh $
030     */
031    public class VennDiagramModel implements Serializable
032    {
033      private static final long serialVersionUID = 1l;
034    
035      /** The field that represents the value of circle A. */
036      public final int circleA;
037    
038      /** The field that represents the value of circle B. */
039      public final int circleB;
040    
041      /** The field that represents the value of circle C. */
042      public final int circleC;
043    
044      /** The field that represents the intersection of circles A and B. */
045      public final int intersectAB;
046    
047      /** The field that represents the intersection of circles A and C. */
048      public final int intersectAC;
049    
050      /** The field that represents the intersection of circles B and C. */
051      public final int intersectBC;
052    
053      /** The field that represents the intersection of circles A, B and C. */
054      public final int intersectABC;
055    
056      /**
057       * Create a new instance for a diagram that has no intersections.
058       *
059       * @param circleA The {@link #circleA} value to use.
060       * @param circleB The {@link #circleB} value to use.
061       * @param circleC The {@link #circleC} value to use.
062       */
063      public VennDiagramModel( final int circleA, final int circleB,
064          final int circleC )
065      {
066        this( circleA, circleB, circleC, 0, 0, 0, 0 );
067      }
068    
069      /**
070       * Create a new instance for a diagram with the specified values.
071       *
072       * @param circleA The {@link #circleA} value to use.
073       * @param circleB The {@link #circleB} value to use.
074       * @param circleC The {@link #circleC} value to use.
075       * @param intersectAB The {@link #intersectAB} value to use.
076       * @param intersectAC The {@link #intersectAC} value to use.
077       * @param intersectBC The {@link #intersectBC} value to use.
078       * @param intersectABC The {@link #intersectABC} value to use.
079       */
080      public VennDiagramModel( final int circleA, final int circleB,
081          final int circleC, final int intersectAB, final int intersectAC,
082          final int intersectBC, final int intersectABC )
083      {
084        this.circleA = circleA;
085        this.circleB = circleB;
086        this.circleC = circleC;
087        this.intersectAB = intersectAB;
088        this.intersectAC = intersectAC;
089        this.intersectBC = intersectBC;
090        this.intersectABC = intersectABC;
091      }
092    
093      /**
094       * Accessor for property 'circleA'.
095       *
096       * @return Value for property 'circleA'.
097       */
098      public int getCircleA()
099      {
100        return circleA;
101      }
102    
103      /**
104       * Accessor for property 'circleB'.
105       *
106       * @return Value for property 'circleB'.
107       */
108      public int getCircleB()
109      {
110        return circleB;
111      }
112    
113      /**
114       * Accessor for property 'circleC'.
115       *
116       * @return Value for property 'circleC'.
117       */
118      public int getCircleC()
119      {
120        return circleC;
121      }
122    
123      /**
124       * Accessor for property 'intersectAB'.
125       *
126       * @return Value for property 'intersectAB'.
127       */
128      public int getIntersectAB()
129      {
130        return intersectAB;
131      }
132    
133      /**
134       * Accessor for property 'intersectAC'.
135       *
136       * @return Value for property 'intersectAC'.
137       */
138      public int getIntersectAC()
139      {
140        return intersectAC;
141      }
142    
143      /**
144       * Accessor for property 'intersectBC'.
145       *
146       * @return Value for property 'intersectBC'.
147       */
148      public int getIntersectBC()
149      {
150        return intersectBC;
151      }
152    
153      /**
154       * Accessor for property 'intersectABC'.
155       *
156       * @return Value for property 'intersectABC'.
157       */
158      public int getIntersectABC()
159      {
160        return intersectABC;
161      }
162    }