Package net.sf.jasperreports.components.spiderchart

Examples of net.sf.jasperreports.components.spiderchart.StandardChartSettings


     *
     */
    public Object createObject(Attributes atts) throws JRException
    {
      // Grab the chart from the object stack.
      StandardChartSettings chartSettings = (StandardChartSettings)digester.peek();

      // Set the text color
      String attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_textColor);
      if (attrValue != null && attrValue.length() > 0)
      {
        Color color = JRColorUtil.getColor(attrValue, null);
        chartSettings.setLegendColor(color);
      }

      // Set the background color
      attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_backgroundColor);
      if (attrValue != null && attrValue.length() > 0)
      {
        Color color = JRColorUtil.getColor(attrValue, null);
        chartSettings.setLegendBackgroundColor(color);
      }

      EdgeEnum position = EdgeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_position));
      if (position != null)
      {
        chartSettings.setLegendPosition(position);
      }

      return chartSettings;
    }
View Full Code Here


  /**
   *
   */
  public Object createObject(Attributes atts)
  {
    StandardChartSettings chartSettings = new StandardChartSettings();

    String isShowLegend = atts.getValue(JRXmlConstants.ATTRIBUTE_isShowLegend);
    if (isShowLegend != null && isShowLegend.length() > 0)
    {
      chartSettings.setShowLegend(Boolean.valueOf(isShowLegend));
    }

    Color backcolor = JRColorUtil.getColor(atts.getValue(JRXmlConstants.ATTRIBUTE_backcolor), null);
    if (backcolor != null)
    {
      chartSettings.setBackcolor(backcolor);
    }
   
    chartSettings.setLinkType(atts.getValue(JRXmlConstants.ATTRIBUTE_hyperlinkType));
    chartSettings.setLinkTarget(atts.getValue(JRXmlConstants.ATTRIBUTE_hyperlinkTarget));

    String bookmarkLevelAttr = atts.getValue(JRXmlConstants.ATTRIBUTE_bookmarkLevel);
    if (bookmarkLevelAttr != null)
    {
      chartSettings.setBookmarkLevel(Integer.parseInt(bookmarkLevelAttr));
    }

    chartSettings.setCustomizerClass(atts.getValue(JRXmlConstants.ATTRIBUTE_customizerClass));
    chartSettings.setRenderType(atts.getValue(JRXmlConstants.ATTRIBUTE_renderType));
   
    return chartSettings;
  }
View Full Code Here

   */
  public static class ChartTitleFactory extends JRBaseFactory
  {
    public Object createObject(Attributes atts)
    {
      StandardChartSettings chartSettings = (StandardChartSettings) digester.peek();

      EdgeEnum position = EdgeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_position));
      if (position != null)
      {
        chartSettings.setTitlePosition(position);
      }
     
      Color color = JRColorUtil.getColor(atts.getValue(JRXmlConstants.ATTRIBUTE_color), Color.black);
      if (color != null)
      {
        chartSettings.setTitleColor(color);
      }
     
      return chartSettings;
    }
View Full Code Here

   */
  public static class ChartSubtitleFactory extends JRBaseFactory
  {
    public Object createObject(Attributes atts)
    {
      StandardChartSettings chartSettings = (StandardChartSettings) digester.peek();

      Color color = JRColorUtil.getColor(atts.getValue(JRXmlConstants.ATTRIBUTE_color), Color.black);
      if (color != null)
      {
        chartSettings.setSubtitleColor(color);
      }

      return chartSettings;
    }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.components.spiderchart.StandardChartSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.