Examples of JRAxisFormat


Examples of net.sf.jasperreports.charts.util.JRAxisFormat

     *
     */
    public Object createObject(Attributes atts) throws JRException
    {
      // Create an empty axis formatting object
      JRAxisFormat axisLabel = new JRAxisFormat();

      // Set the label color
      String attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_labelColor);
      if (attrValue != null && attrValue.length() > 0)
      {
        Color color = JRColorUtil.getColor(attrValue, null);
        axisLabel.setLabelColor(color);
      }

      // Set the tick label color
      attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_tickLabelColor);
      if (attrValue != null && attrValue.length() > 0)
      {
        Color color = JRColorUtil.getColor(attrValue, null);
        axisLabel.setTickLabelColor(color);
      }

      // Set the tick mask
      attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_tickLabelMask);
      if (attrValue != null && attrValue.length() > 0)
      {
        axisLabel.setTickLabelMask(attrValue);
      }

      // Set the vertical tick labels flag
      attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_verticalTickLabels);
      if (attrValue != null && attrValue.length() > 0)
      {
        axisLabel.setVerticalTickLabel(Boolean.valueOf(attrValue));
      }

      // And finally set the axis line color
      attrValue = atts.getValue(JRXmlConstants.ATTRIBUTE_axisLineColor);
      if (attrValue != null && attrValue.length() > 0)
      {
        Color color = JRColorUtil.getColor(attrValue, null);
        axisLabel.setLineColor(color);
      }

      // Any fonts set will be put in the axis format object by the digester.

      return axisLabel;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.