1 13 28 29 package org.pentaho.plugin.jfreechart; 30 31 import java.awt.Color ; 32 import java.awt.Font ; 33 import java.awt.Image ; 34 import java.awt.Paint ; 35 import java.util.ArrayList ; 36 import java.util.Date ; 37 import java.util.Iterator ; 38 import java.util.List ; 39 40 import org.dom4j.Node; 41 import org.jfree.chart.plot.PlotOrientation; 42 import org.jfree.chart.title.TextTitle; 43 import org.jfree.data.time.TimeSeriesCollection; 44 import org.jfree.data.time.TimeSeries; 45 import org.jfree.data.time.TimeSeriesDataItem; 46 import org.jfree.data.time.Day; 47 import org.jfree.data.time.Hour; 48 import org.jfree.data.time.Millisecond; 49 import org.jfree.data.time.Minute; 50 import org.jfree.data.time.Month; 51 import org.jfree.data.time.Quarter; 52 import org.jfree.data.time.RegularTimePeriod; 53 import org.jfree.data.time.Second; 54 import org.jfree.data.time.Week; 55 import org.jfree.data.time.Year; 56 import org.jfree.ui.RectangleEdge; 57 import org.pentaho.core.connection.IPentahoResultSet; 58 import org.pentaho.core.session.IPentahoSession; 59 60 public class TimeSeriesCollectionChartDefinition extends TimeSeriesCollection implements ChartDefinition { 61 62 private static final String STACKED_NODE_NAME = "is-stacked"; 64 private static final String ORIENTATION_NODE_NAME = "orientation"; 66 private static final String DOMAIN_TITLE_NODE_NAME = "domain-title"; 68 private static final String DOMAIN_TITLE_FONT_NODE_NAME = "domain-title-font"; 70 private static final String RANGE_TITLE_NODE_NAME = "range-title"; 72 private static final String RANGE_TITLE_FONT_NODE_NAME = "range-title-font"; 74 private static final String DOMAIN_VERTICAL_TICK_LABELS_NODE_NAME = "domain-vertical-tick-labels"; 76 private static final String DOMAIN_PERIOD_TYPE_NODE_NAME = "domain-period-type"; 78 private static final String CHART_BORDER_PAINT_NODE_NAME = "border-paint"; 80 private int chartType = JFreeChartEngine.UNDEFINED_CHART_TYPE; 81 82 private String title = ""; 85 private RectangleEdge titlePosition = RectangleEdge.TOP; 86 87 private Font titleFont = TextTitle.DEFAULT_FONT; 88 89 private List subTitles = new ArrayList (); 90 91 private Paint chartBackgroundPaint = Color.WHITE; 92 93 private Image chartBackgroundImage = null; 94 95 private boolean borderVisible = false; 96 97 private Paint borderPaint = Color.BLACK; 98 99 private int width = 200; 100 101 private int height = 200; 102 103 private PlotOrientation orientation = PlotOrientation.VERTICAL; 105 106 private Paint plotBackgroundPaint = Color.WHITE; 107 108 private Image plotBackgroundImage = null; 109 110 private boolean legendIncluded = true; 111 112 private boolean threeD = false; 113 114 private boolean stacked = false; 115 116 private boolean domainVerticalTickLabels = false; 117 118 private String domainPeriodType = "Millisecond"; 120 private Paint [] paintSequence = null; 121 122 private String domainTitle = null; 123 124 private Font domainTitleFont = TextTitle.DEFAULT_FONT; 125 126 private String rangeTitle = null; 127 128 private Font rangeTitleFont = TextTitle.DEFAULT_FONT; 129 130 private IPentahoSession session; 132 133 136 private static final long serialVersionUID = 1717509132920946530L; 137 138 public TimeSeriesCollectionChartDefinition(IPentahoSession session) { 139 super(); 140 this.session = session; 141 } 142 143 public TimeSeriesCollectionChartDefinition(int chartType, IPentahoResultSet data, boolean byRow, Node chartAttributes, IPentahoSession session) { 144 this(session); 145 this.chartType = chartType; 146 setChartAttributes(chartAttributes); 147 if (byRow) { 148 setDataByRow(data); 149 } else { 150 setDataByColumn(data); 151 } 152 } 153 154 public TimeSeriesCollectionChartDefinition(IPentahoResultSet data, boolean byRow, Node chartAttributes, IPentahoSession session) { 155 this(JFreeChartEngine.UNDEFINED_CHART_TYPE, data, byRow, chartAttributes, session); 156 } 157 158 private void setChartAttributes(Node chartAttributes) { 159 if (chartAttributes == null) { 160 return; 161 } 162 setChartType(chartAttributes.selectSingleNode(TYPE_NODE_NAME)); 165 166 setChartBackground(chartAttributes.selectSingleNode(CHART_BACKGROUND_NODE_NAME)); 168 169 setPlotBackground(chartAttributes.selectSingleNode(PLOT_BACKGROUND_NODE_NAME)); 171 172 setOrientation(chartAttributes.selectSingleNode(ORIENTATION_NODE_NAME)); 174 175 setLegendIncluded(chartAttributes.selectSingleNode(INCLUDE_LEGEND_NODE_NAME)); 177 178 setTitle(chartAttributes.selectSingleNode(TITLE_NODE_NAME)); 180 181 addSubTitles(chartAttributes.selectNodes(SUBTITLE_NODE_NAME)); 183 184 setPaintSequence(chartAttributes.selectSingleNode(PALETTE_NODE_NAME)); 186 187 setStacked(chartAttributes.selectSingleNode(STACKED_NODE_NAME)); 189 190 setThreeD(chartAttributes.selectSingleNode(THREED_NODE_NAME)); 192 193 setWidth(chartAttributes.selectSingleNode(WIDTH_NODE_NAME)); 195 196 setHeight(chartAttributes.selectSingleNode(HEIGHT_NODE_NAME)); 198 199 setDomainVerticalTickLabels(chartAttributes.selectSingleNode(DOMAIN_VERTICAL_TICK_LABELS_NODE_NAME)); 201 202 setBorderVisible(chartAttributes.selectSingleNode(CHART_BORDER_VISIBLE_NODE_NAME)); 204 205 setBorderPaint(JFreeChartEngine.getPaint(chartAttributes.selectSingleNode(CHART_BORDER_PAINT_NODE_NAME))); 207 208 setTitlePosition(chartAttributes.selectSingleNode(TITLE_POSITION_NODE_NAME)); 210 211 setTitleFont(chartAttributes.selectSingleNode(TITLE_FONT_NODE_NAME)); 213 214 setDomainTitle(chartAttributes.selectSingleNode(DOMAIN_TITLE_NODE_NAME)); 216 217 setDomainTitleFont(chartAttributes.selectSingleNode(DOMAIN_TITLE_FONT_NODE_NAME)); 219 220 setRangeTitle(chartAttributes.selectSingleNode(RANGE_TITLE_NODE_NAME)); 222 223 setRangeTitleFont(chartAttributes.selectSingleNode(RANGE_TITLE_FONT_NODE_NAME)); 225 226 setDomainPeriodType(chartAttributes.selectSingleNode(DOMAIN_PERIOD_TYPE_NODE_NAME)); 228 } 229 230 private void setDataByColumn(IPentahoResultSet data) { 231 if (data == null) { 233 return; } 236 boolean firstPass = true; 237 String lastSeries = ""; String seriesName = ""; Class timePeriodClass = getTimePeriodClass( getDomainPeriodType() ); 240 Object [] rowData = data.next(); 241 TimeSeries wrkSeries = null; 242 while (rowData != null) { 243 seriesName = (String ) rowData[0]; 244 if ( firstPass || !seriesName.equalsIgnoreCase( lastSeries ) ) { 245 if ( !firstPass ) { 246 addSeries( wrkSeries ); 247 } 248 wrkSeries = new TimeSeries( seriesName, timePeriodClass ); 249 lastSeries = seriesName; 250 firstPass = false; 251 } 252 RegularTimePeriod regularTimePeriod = RegularTimePeriod.createInstance( timePeriodClass, 253 (Date ) rowData[1], 254 RegularTimePeriod.DEFAULT_TIME_ZONE ); 255 TimeSeriesDataItem timeSeriesDataItem = new TimeSeriesDataItem( 256 regularTimePeriod, 257 ((Number ) rowData[2]).doubleValue() ); 258 wrkSeries.add( timeSeriesDataItem ); 259 rowData = data.next(); 260 } 261 if ( !firstPass ) { 262 addSeries( wrkSeries ); 263 } 264 } 265 266 private void setDataByRow(IPentahoResultSet data) { 267 if (data == null) { 269 return; } 272 Class timePeriodClass = getTimePeriodClass( getDomainPeriodType() ); 273 Object [] rowData = data.next(); 274 while (rowData != null) { 275 String seriesName = (String ) rowData[0]; 276 TimeSeries wrkSeries = new TimeSeries( seriesName, timePeriodClass ); 277 for (int column = 1; column < rowData.length - 1; column = column + 2) { 278 TimeSeriesDataItem timeSeriesDataItem = new TimeSeriesDataItem( 279 RegularTimePeriod.createInstance(timePeriodClass, (Date ) rowData[column], RegularTimePeriod.DEFAULT_TIME_ZONE), 280 ((Number ) rowData[column+1]).doubleValue() ); 281 wrkSeries.add( timeSeriesDataItem ); 282 } 283 addSeries( wrkSeries ); 284 rowData = data.next(); 285 } 286 } 287 288 private Class getTimePeriodClass( String timePeriodStr ) { 289 Class retClass = Millisecond.class; 290 if (timePeriodStr.equalsIgnoreCase( SECOND_PERIOD_TYPE_STR )) { 291 retClass = Second.class; 292 } else if (timePeriodStr.equalsIgnoreCase( MINUTE_PERIOD_TYPE_STR )) { 293 retClass = Minute.class; 294 } else if (timePeriodStr.equalsIgnoreCase( HOUR_PERIOD_TYPE_STR )) { 295 retClass = Hour.class; 296 } else if (timePeriodStr.equalsIgnoreCase( DAY_PERIOD_TYPE_STR )) { 297 retClass = Day.class; 298 } else if (timePeriodStr.equalsIgnoreCase( WEEK_PERIOD_TYPE_STR )) { 299 retClass = Week.class; 300 } else if (timePeriodStr.equalsIgnoreCase( MONTH_PERIOD_TYPE_STR )) { 301 retClass = Month.class; 302 } else if (timePeriodStr.equalsIgnoreCase( QUARTER_PERIOD_TYPE_STR )) { 303 retClass = Quarter.class; 304 } else if (timePeriodStr.equalsIgnoreCase( YEAR_PERIOD_TYPE_STR )) { 305 retClass = Year.class; 306 } 307 return retClass; 308 } 309 310 314 public void setChartBackgroundPaint(Paint chartBackgroundPaint) { 315 if (chartBackgroundPaint != null) { 316 this.chartBackgroundPaint = chartBackgroundPaint; 317 } 318 } 319 320 325 public Font getTitleFont() { 326 return titleFont; 327 } 328 329 public void setTitleFont(Font titleFont) { 330 this.titleFont = titleFont; 331 } 332 333 public void setTitleFont(Node titleFontNode) { 334 Font font = JFreeChartEngine.getFont(titleFontNode); 335 if (font != null) { 336 setTitleFont(font); 337 } 338 } 339 340 343 public Paint getChartBackgroundPaint() { 344 return chartBackgroundPaint; 345 } 346 347 350 public int getChartType() { 351 return chartType; 352 } 353 354 public static int getChartType(String typeStr) { 355 if (typeStr != null) { 356 if (LINE_CHART_STR.equalsIgnoreCase(typeStr)) { 357 return JFreeChartEngine.LINE_CHART_TYPE; 358 } else if (AREA_CHART_STR.equalsIgnoreCase(typeStr)) { 359 return JFreeChartEngine.AREA_CHART_TYPE; 360 } else if (STEP_CHART_STR.equalsIgnoreCase(typeStr)) { 361 return JFreeChartEngine.STEP_CHART_TYPE; 362 } else if (STEP_AREA_CHART_STR.equalsIgnoreCase(typeStr)) { 363 return JFreeChartEngine.STEP_AREA_CHART_TYPE; 364 } else if (DIFFERENCE_CHART_STR.equalsIgnoreCase(typeStr)) { 365 return JFreeChartEngine.DIFFERENCE_CHART_TYPE; 366 } else if (DOT_CHART_STR.equalsIgnoreCase(typeStr)) { 367 return JFreeChartEngine.DOT_CHART_TYPE; 368 } 369 } 370 return JFreeChartEngine.UNDEFINED_CHART_TYPE; 371 } 372 373 public void setChartType(Node chartTypeNode) { 374 if (chartTypeNode != null) { 375 String typeStr = chartTypeNode.getText(); 376 setChartType(getChartType(typeStr)); 377 } 378 } 379 380 384 public void setChartType(int chartType) { 385 this.chartType = chartType; 386 } 387 388 391 public boolean isThreeD() { 392 return threeD; 393 } 394 395 public void setThreeD(Node threeDNode) { 396 if (threeDNode != null) { 397 String boolStr = threeDNode.getText(); 398 Boolean booleanValue = new Boolean (boolStr); 399 setThreeD(booleanValue.booleanValue()); 400 } 401 } 402 403 407 public void setThreeD(boolean threeD) { 408 this.threeD = threeD; 409 } 410 411 414 public boolean isStacked() { 415 return stacked; 416 } 417 418 public void setStacked(Node stackedNode) { 419 if (stackedNode != null) { 420 String boolStr = stackedNode.getText(); 421 Boolean booleanValue = new Boolean (boolStr); 422 setStacked(booleanValue.booleanValue()); 423 } 424 } 425 426 430 public void setStacked(boolean stacked) { 431 this.stacked = stacked; 432 } 433 434 437 public boolean isDomainVerticalTickLabels() { 438 return domainVerticalTickLabels; 439 } 440 441 public void setDomainVerticalTickLabels(Node domainVerticalTickLabelsNode) { 442 if (domainVerticalTickLabelsNode != null) { 443 String boolStr = domainVerticalTickLabelsNode.getText(); 444 Boolean booleanValue = new Boolean (boolStr); 445 setDomainVerticalTickLabels(booleanValue.booleanValue()); 446 } 447 } 448 449 453 public void setDomainVerticalTickLabels(boolean domainVerticalTickLabels) { 454 this.domainVerticalTickLabels = domainVerticalTickLabels; 455 } 456 457 460 public String getDomainPeriodType() { 461 return domainPeriodType; 462 } 463 464 public void setDomainPeriodType(Node domainPeriodTypeNode) { 465 if (domainPeriodTypeNode != null) { 466 setDomainPeriodType(domainPeriodTypeNode.getText()); 467 } 468 } 469 470 474 public void setDomainPeriodType(String domainPeriodType) { 475 this.domainPeriodType = domainPeriodType; 476 } 477 478 481 public int getHeight() { 482 return height; 483 } 484 485 public void setHeight(Node heightNode) { 486 if (heightNode != null) { 487 setHeight(Integer.parseInt(heightNode.getText())); 488 } 489 } 490 491 495 public void setHeight(int height) { 496 this.height = height; 497 } 498 499 502 public int getWidth() { 503 return width; 504 } 505 506 public void setWidth(Node widthNode) { 507 if (widthNode != null) { 508 setWidth(Integer.parseInt(widthNode.getText())); 509 } 510 } 511 512 516 public void setWidth(int width) { 517 this.width = width; 518 } 519 520 523 public String getTitle() { 524 return title; 525 } 526 527 public void setTitle(Node chartTitleNode) { 528 if (chartTitleNode != null) { 529 setTitle(chartTitleNode.getText()); 530 } 531 } 532 533 537 public void setTitle(String title) { 538 this.title = title; 539 } 540 541 544 public Paint [] getPaintSequence() { 545 return paintSequence; 546 } 547 548 public void setPaintSequence(Node paletteNode) { 549 if (paletteNode != null) { 550 List colorNodes = paletteNode.selectNodes(COLOR_NODE_NAME); 551 Paint [] paints = new Paint [colorNodes.size()]; 552 for (int i = 0; i < colorNodes.size(); i++) { 553 paints[i] = JFreeChartEngine.getPaint((Node) colorNodes.get(i)); 554 } 555 setPaintSequence(paints); 556 } 557 } 558 559 563 public void setPaintSequence(Paint [] paintSequence) { 564 this.paintSequence = paintSequence; 565 } 566 567 570 public List getSubtitles() { 571 return subTitles; 572 } 573 574 public void addSubTitles(List subTitleNodes) { 575 if (subTitleNodes != null) { 576 Iterator iter = subTitleNodes.iterator(); 577 while (iter.hasNext()) { 578 addSubTitle(((Node) iter.next()).getText()); 579 } 580 } 581 } 582 583 public void addSubTitle(String subTitle) { 584 subTitles.add(subTitle); 585 } 586 587 590 public Image getChartBackgroundImage() { 591 return chartBackgroundImage; 592 } 593 594 public void setChartBackgroundImage(Node chartBackgroundImageNode) { 595 setChartBackgroundImage(JFreeChartEngine.getImage(chartBackgroundImageNode, getSession())); 596 } 597 598 602 public void setChartBackgroundImage(Image chartBackgroundImage) { 603 this.chartBackgroundImage = chartBackgroundImage; 604 } 605 606 609 public boolean isLegendIncluded() { 610 return legendIncluded; 611 } 612 613 public void setLegendIncluded(Node legendNode) { 614 if (legendNode != null) { 615 String boolStr = legendNode.getText(); 616 Boolean booleanValue = new Boolean (boolStr); 617 setLegendIncluded(booleanValue.booleanValue()); 618 } 619 } 620 621 625 public void setLegendIncluded(boolean legendIncluded) { 626 this.legendIncluded = legendIncluded; 627 } 628 629 public void setPlotBackgroundPaint(Paint plotBackgroundPaint) { 630 if (plotBackgroundPaint != null) { 631 this.plotBackgroundPaint = plotBackgroundPaint; 632 } 633 } 634 635 public Paint getPlotBackgroundPaint() { 636 return plotBackgroundPaint; 637 } 638 639 642 public Image getPlotBackgroundImage() { 643 return plotBackgroundImage; 644 } 645 646 public void setPlotBackgroundImage(Node plotBackgroundImageNode) { 647 setPlotBackgroundImage(JFreeChartEngine.getImage(plotBackgroundImageNode, getSession())); 648 } 649 650 654 public void setPlotBackgroundImage(Image plotBackgroundImage) { 655 this.plotBackgroundImage = plotBackgroundImage; 656 } 657 658 661 public PlotOrientation getOrientation() { 662 return orientation; 663 } 664 665 public void setOrientation(Node orientationNode) { 666 if (orientationNode != null) { 667 String orientationStr = orientationNode.getText(); 668 if (VERTICAL_ORIENTATION.equalsIgnoreCase(orientationStr)) { 669 setOrientation(PlotOrientation.VERTICAL); 670 } else if (HORIZONTAL_ORIENTATION.equalsIgnoreCase(orientationStr)) { 671 setOrientation(PlotOrientation.HORIZONTAL); 672 } 673 } 674 } 675 676 680 public void setOrientation(PlotOrientation orientation) { 681 this.orientation = orientation; 682 } 683 684 687 public boolean isBorderVisible() { 688 return borderVisible; 689 } 690 691 public void setBorderVisible(Node borderVisibleNode) { 692 if (borderVisibleNode != null) { 693 String boolStr = borderVisibleNode.getText(); 694 Boolean booleanValue = new Boolean (boolStr); 695 setBorderVisible(booleanValue.booleanValue()); 696 } 697 } 698 699 703 public void setBorderVisible(boolean borderVisible) { 704 this.borderVisible = borderVisible; 705 } 706 707 710 public Paint getBorderPaint() { 711 return borderPaint; 712 } 713 714 718 public void setBorderPaint(Paint borderPaint) { 719 this.borderPaint = borderPaint; 720 } 721 722 public void setTitlePosition(Node titlePositionNode) { 723 if (titlePositionNode != null) { 724 String titlePositionStr = titlePositionNode.getText(); 725 if ("top".equalsIgnoreCase(titlePositionStr)) { setTitlePosition(RectangleEdge.TOP); 727 } else if ("left".equalsIgnoreCase(titlePositionStr)) { setTitlePosition(RectangleEdge.LEFT); 729 } else if ("bottom".equalsIgnoreCase(titlePositionStr)) { setTitlePosition(RectangleEdge.BOTTOM); 731 } else if ("right".equalsIgnoreCase(titlePositionStr)) { setTitlePosition(RectangleEdge.RIGHT); 733 } 734 } 735 } 736 737 740 public RectangleEdge getTitlePosition() { 741 return titlePosition; 742 } 743 744 748 public void setTitlePosition(RectangleEdge titlePosition) { 749 this.titlePosition = titlePosition; 750 } 751 752 public void setChartBackground(Node chartBackgroundNode) { 753 if (chartBackgroundNode != null) { 754 Node backgroundTypeNode = chartBackgroundNode.selectSingleNode(BACKGROUND_TYPE_ATTRIBUTE_NAME); 755 if (backgroundTypeNode != null) { 756 String backgroundTypeStr = backgroundTypeNode.getText(); 757 if (COLOR_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 758 setChartBackgroundPaint(JFreeChartEngine.getPaint(chartBackgroundNode)); 759 setChartBackgroundImage((Image ) null); 760 } else if (IMAGE_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 761 setChartBackgroundImage(chartBackgroundNode); 762 setChartBackgroundPaint(null); 763 } else if (TEXTURE_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 764 setChartBackgroundPaint(JFreeChartEngine.getTexturePaint(chartBackgroundNode, getWidth(), getHeight(), getSession())); 765 setChartBackgroundImage((Image ) null); 766 } else if (GRADIENT_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 767 setChartBackgroundPaint(JFreeChartEngine.getGradientPaint(chartBackgroundNode, getWidth(), getHeight())); 768 setChartBackgroundImage((Image ) null); 769 } 770 } 771 } 772 } 773 774 public void setPlotBackground(Node plotBackgroundNode) { 775 if (plotBackgroundNode != null) { 776 Node backgroundTypeNode = plotBackgroundNode.selectSingleNode(BACKGROUND_TYPE_ATTRIBUTE_NAME); 777 if (backgroundTypeNode != null) { 778 String backgroundTypeStr = backgroundTypeNode.getText(); 779 if (COLOR_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 780 setPlotBackgroundPaint(JFreeChartEngine.getPaint(plotBackgroundNode)); 781 setPlotBackgroundImage((Image ) null); 782 } else if (IMAGE_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 783 setPlotBackgroundImage(plotBackgroundNode); 784 setPlotBackgroundPaint(null); 785 } else if (TEXTURE_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 786 setPlotBackgroundPaint(JFreeChartEngine.getTexturePaint(plotBackgroundNode, getWidth(), getHeight(), getSession())); 787 setPlotBackgroundImage((Image ) null); 788 } else if (GRADIENT_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) { 789 setPlotBackgroundPaint(JFreeChartEngine.getGradientPaint(plotBackgroundNode, getWidth(), getHeight())); 790 setPlotBackgroundImage((Image ) null); 791 } 792 } 793 } 794 } 795 796 public void setDomainTitle(Node titleNode) { 797 if (titleNode != null) { 798 setDomainTitle(titleNode.getText()); 799 } 800 } 801 802 805 public String getDomainTitle() { 806 return domainTitle; 807 } 808 809 813 public void setDomainTitle(String domainTitle) { 814 this.domainTitle = domainTitle; 815 } 816 817 public void setRangeTitle(Node titleNode) { 818 if (titleNode != null) { 819 setRangeTitle(titleNode.getText()); 820 } 821 } 822 823 826 public String getRangeTitle() { 827 return rangeTitle; 828 } 829 830 834 public void setRangeTitle(String rangeTitle) { 835 this.rangeTitle = rangeTitle; 836 } 837 838 public void setDomainTitleFont(Node titleFontNode) { 839 Font font = JFreeChartEngine.getFont(titleFontNode); 840 if (font != null) { 841 setDomainTitleFont(font); 842 } 843 } 844 845 848 public Font getDomainTitleFont() { 849 return domainTitleFont; 850 } 851 852 856 public void setDomainTitleFont(Font domainTitleFont) { 857 this.domainTitleFont = domainTitleFont; 858 } 859 860 public void setRangeTitleFont(Node titleFontNode) { 861 Font font = JFreeChartEngine.getFont(titleFontNode); 862 if (font != null) { 863 setRangeTitleFont(font); 864 } 865 } 866 867 870 public Font getRangeTitleFont() { 871 return rangeTitleFont; 872 } 873 874 878 public void setRangeTitleFont(Font rangeTitleFont) { 879 this.rangeTitleFont = rangeTitleFont; 880 } 881 882 public boolean isDisplayLabels() { 883 return false; 885 } 886 887 public IPentahoSession getSession() { 888 return session; 889 } 890 891 public void setSession(IPentahoSession session) { 892 this.session = session; 893 } 894 } 895
| Popular Tags
|