001    package railo.runtime.tag;
002    
003    import railo.runtime.exp.ExpressionException;
004    import railo.runtime.ext.tag.TagImpl;
005    
006    /**
007    * Specifies a data point to be displayed by a cfgraph tag.
008    *
009    *
010    *
011    **/
012    public final class GraphData extends TagImpl {
013    
014            /** The item label for the data point. The item labels appear on the horizontal axis of Line and 
015            **              Bar charts, the vertical axis of Horizontal Bar charts, and in the legend of Pie charts. */
016            private String item;
017    
018            /** The color to use when graphing the data point. The default is to use the values from the cfgraph
019            **              tag colorlist attribute or the built-in default list of colors. Line graphs ignore this attribute. */
020            private String color;
021    
022            /** Value to be represented by the data point. */
023            private String value;
024    
025            /** A URL to load when the user clicks the data point. This attribute works with Pie, Bar, and 
026            **              HorizontalBar charts. This attribute has an effect only if the graph is in Flash file format. */
027            private String url;
028    
029    
030            /**
031            * constructor for the tag class
032            **/
033            public GraphData() throws ExpressionException {
034                    throw new ExpressionException("tag cfgraphdata is deprecated");
035            }
036    
037            /** set the value item
038            *  The item label for the data point. The item labels appear on the horizontal axis of Line and 
039            *               Bar charts, the vertical axis of Horizontal Bar charts, and in the legend of Pie charts.
040            * @param item value to set
041            **/
042            public void setItem(String item)        {
043                    this.item=item;
044            }
045    
046            /** set the value color
047            *  The color to use when graphing the data point. The default is to use the values from the cfgraph
048            *               tag colorlist attribute or the built-in default list of colors. Line graphs ignore this attribute.
049            * @param color value to set
050            **/
051            public void setColor(String color)      {
052                    this.color=color;
053            }
054    
055            /** set the value value
056            *  Value to be represented by the data point.
057            * @param value value to set
058            **/
059            public void setValue(String value)      {
060                    this.value=value;
061            }
062    
063            /** set the value url
064            *  A URL to load when the user clicks the data point. This attribute works with Pie, Bar, and 
065            *               HorizontalBar charts. This attribute has an effect only if the graph is in Flash file format.
066            * @param url value to set
067            **/
068            public void setUrl(String url)  {
069                    this.url=url;
070            }
071    
072    
073            @Override
074            public int doStartTag() {
075                    return SKIP_BODY;
076            }
077    
078            @Override
079            public int doEndTag()   {
080                    return EVAL_PAGE;
081            }
082    
083            @Override
084            public void release()   {
085                    super.release();
086                    item="";
087                    color="";
088                    value="";
089                    url="";
090            }
091    }