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 echopoint.google.chart.internal.Marker;
022    
023    /**
024     * A model object that represents a shape marker for data points on a graph.
025     * See <a href='http://code.google.com/apis/chart/#shape_markers2'>Shape
026     * markers</a> specifications.
027     *
028     * @author Rakesh 2008-08-10
029     * @version $Id: ShapeMarker.java 63 2008-08-29 07:46:39Z sptrakesh $
030     */
031    public class ShapeMarker extends Marker
032    {
033      private static final long serialVersionUID = 1l;
034    
035      /** The size of the marker. */
036      private int size;
037    
038      /** The priority for drawing the marker. */
039      private int priority;
040    
041      /**
042       * Create a new instance using the specified values.
043       *
044       * @param markerType The {@link #markerType} to use.
045       * @param color The {@link #color} to use.
046       * @param size The {@link #size} to use.
047       * @param priority The {@link #priority} to use.
048       */
049      public ShapeMarker( final String markerType, final String color,
050          final int size, final int... priority )
051      {
052        this.markerType = markerType;
053        this.color = color;
054        this.size = size;
055        this.priority = ( priority.length == 0 ) ? 0 : priority[0];
056      }
057    
058      /**
059       * Accessor for property 'size'.
060       *
061       * @return Value for property 'size'.
062       */
063      public int getSize()
064      {
065        return size;
066      }
067    
068      /**
069       * Accessor for property 'priority'.
070       *
071       * @return Value for property 'priority'.
072       */
073      public int getPriority()
074      {
075        return priority;
076      }
077    }