public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { // System.out.println("wind info:"+info); if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity)info); } else if (info instanceof TickLabelEntity) { area.setAttribute("entity", "CATEGORY"); Integer seq = (Integer)chart.getAttribute("TICK_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("TICK_SEQ", seq); decodeTickLabelInfo(area, (TickLabelEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity)info); } else if (info instanceof TickLabelEntity) { area.setAttribute("entity", "CATEGORY"); Integer seq = (Integer)chart.getAttribute("TICK_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("TICK_SEQ", seq); decodeTickLabelInfo(area, (TickLabelEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity)info); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity) info, chart); } else if (info instanceof TickLabelEntity) { area.setAttribute("entity", "CATEGORY"); Integer seq = (Integer)chart.getAttribute("TICK_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("TICK_SEQ", seq); decodeTickLabelInfo(area, (TickLabelEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } }
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity)info); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity) info, chart); } else if (info instanceof TickLabelEntity) { area.setAttribute("entity", "CATEGORY"); Integer seq = (Integer)chart.getAttribute("TICK_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("TICK_SEQ", seq); decodeTickLabelInfo(area, (TickLabelEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity)info); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity) info, chart); } else if (info instanceof TickLabelEntity) { area.setAttribute("entity", "CATEGORY"); Integer seq = (Integer)chart.getAttribute("TICK_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("TICK_SEQ", seq); decodeTickLabelInfo(area, (TickLabelEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } }
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity)info); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity) info, chart); } else if (info instanceof TickLabelEntity) { area.setAttribute("entity", "CATEGORY"); Integer seq = (Integer)chart.getAttribute("TICK_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("TICK_SEQ", seq); decodeTickLabelInfo(area, (TickLabelEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof PieSectionEntity) { area.setAttribute("entity", "DATA"); decodePieInfo(area, (PieSectionEntity)info); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } }
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity) info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof XYItemEntity) { area.setAttribute("entity", "DATA"); decodeXYInfo(area, (XYItemEntity)info, chart); } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
/** * decode TickLabelEntity into key-value pair of Area's componentScope. * @param area the Area where the final attribute is set * @param info the TickLabelEntity to be decoded. */ private void decodeTickLabelInfo(Area area, TickLabelEntity info, Chart chart) { if (info == null) { return; } final ChartModel model = chart.getModel(); final int seq = ((Integer)chart.getAttribute("TICK_SEQ")).intValue(); if (model instanceof CategoryModel) { Comparable category = ((CategoryModel)model).getCategory(seq); area.setAttribute("category", category); if (chart.isShowTooltiptext() && info.getToolTipText() == null) { area.setTooltiptext(category.toString()); } } }
public void render(Chart chart, Area area, ChartEntity info) { if (info instanceof LegendItemEntity) { area.setAttribute("entity", "LEGEND"); Integer seq = (Integer)chart.getAttribute("LEGEND_SEQ"); seq = seq == null ? new Integer(0) : new Integer(seq.intValue()+1); chart.setAttribute("LEGEND_SEQ", seq); decodeLegendInfo(area, (LegendItemEntity)info, chart); } else if (info instanceof CategoryLabelEntity) { area.setAttribute("entity", "CATEGORY"); decodeCategoryLabelInfo(area, (CategoryLabelEntity) info, chart); } else if (info instanceof CategoryItemEntity) { area.setAttribute("entity", "DATA"); decodeCategoryInfo(area, (CategoryItemEntity) info); if (chart.isShowTooltiptext()) { area.setTooltiptext(ganttTooltip(chart, area)); } } else { area.setAttribute("entity", "TITLE"); if (chart.isShowTooltiptext()) { area.setTooltiptext(chart.getTitle()); } } } public JFreeChart createChart(Chart chart) {
final int seq = ((Integer)chart.getAttribute("LEGEND_SEQ")).intValue();