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; }
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; }
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; }
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; }