1 81 82 package org.jfree.chart.renderer.xy; 83 84 import java.awt.Font ; 85 import java.awt.Graphics2D ; 86 import java.awt.Paint ; 87 import java.awt.Shape ; 88 import java.awt.Stroke ; 89 import java.awt.geom.Rectangle2D ; 90 91 import org.jfree.chart.LegendItem; 92 import org.jfree.chart.LegendItemSource; 93 import org.jfree.chart.annotations.XYAnnotation; 94 import org.jfree.chart.axis.ValueAxis; 95 import org.jfree.chart.event.RendererChangeEvent; 96 import org.jfree.chart.event.RendererChangeListener; 97 import org.jfree.chart.labels.ItemLabelPosition; 98 import org.jfree.chart.labels.XYItemLabelGenerator; 99 import org.jfree.chart.labels.XYSeriesLabelGenerator; 100 import org.jfree.chart.labels.XYToolTipGenerator; 101 import org.jfree.chart.plot.CrosshairState; 102 import org.jfree.chart.plot.Marker; 103 import org.jfree.chart.plot.PlotRenderingInfo; 104 import org.jfree.chart.plot.XYPlot; 105 import org.jfree.chart.urls.XYURLGenerator; 106 import org.jfree.data.Range; 107 import org.jfree.data.xy.XYDataset; 108 import org.jfree.ui.Layer; 109 110 117 public interface XYItemRenderer extends LegendItemSource { 118 119 135 public XYItemRendererState initialise(Graphics2D g2, 136 Rectangle2D dataArea, 137 XYPlot plot, 138 XYDataset dataset, 139 PlotRenderingInfo info); 140 141 146 public int getPassCount(); 147 148 157 public boolean getItemVisible(int series, int item); 158 159 167 public boolean isSeriesVisible(int series); 168 169 176 public Boolean getSeriesVisible(); 177 178 186 public void setSeriesVisible(Boolean visible); 187 188 197 public void setSeriesVisible(Boolean visible, boolean notify); 198 199 206 public Boolean getSeriesVisible(int series); 207 208 215 public void setSeriesVisible(int series, Boolean visible); 216 217 226 public void setSeriesVisible(int series, Boolean visible, boolean notify); 227 228 233 public boolean getBaseSeriesVisible(); 234 235 241 public void setBaseSeriesVisible(boolean visible); 242 243 250 public void setBaseSeriesVisible(boolean visible, boolean notify); 251 252 254 262 public boolean isSeriesVisibleInLegend(int series); 263 264 272 public Boolean getSeriesVisibleInLegend(); 273 274 282 public void setSeriesVisibleInLegend(Boolean visible); 283 284 293 public void setSeriesVisibleInLegend(Boolean visible, boolean notify); 294 295 305 public Boolean getSeriesVisibleInLegend(int series); 306 307 314 public void setSeriesVisibleInLegend(int series, Boolean visible); 315 316 325 public void setSeriesVisibleInLegend(int series, Boolean visible, 326 boolean notify); 327 328 333 public boolean getBaseSeriesVisibleInLegend(); 334 335 341 public void setBaseSeriesVisibleInLegend(boolean visible); 342 343 350 public void setBaseSeriesVisibleInLegend(boolean visible, boolean notify); 351 352 354 362 public Paint getItemPaint(int row, int column); 363 364 371 public Paint getSeriesPaint(int series); 372 373 380 public void setPaint(Paint paint); 381 382 389 public void setSeriesPaint(int series, Paint paint); 390 391 396 public Paint getBasePaint(); 397 398 404 public void setBasePaint(Paint paint); 405 406 408 416 public Paint getItemOutlinePaint(int row, int column); 417 418 425 public Paint getSeriesOutlinePaint(int series); 426 427 434 public void setSeriesOutlinePaint(int series, Paint paint); 435 436 441 public void setOutlinePaint(Paint paint); 442 443 448 public Paint getBaseOutlinePaint(); 449 450 456 public void setBaseOutlinePaint(Paint paint); 457 458 460 468 public Stroke getItemStroke(int row, int column); 469 470 477 public Stroke getSeriesStroke(int series); 478 479 485 public void setStroke(Stroke stroke); 486 487 494 public void setSeriesStroke(int series, Stroke stroke); 495 496 501 public Stroke getBaseStroke(); 502 503 508 public void setBaseStroke(Stroke stroke); 509 510 512 522 public Stroke getItemOutlineStroke(int row, int column); 523 524 531 public Stroke getSeriesOutlineStroke(int series); 532 533 539 public void setOutlineStroke(Stroke stroke); 540 541 548 public void setSeriesOutlineStroke(int series, Stroke stroke); 549 550 555 public Stroke getBaseOutlineStroke(); 556 557 563 public void setBaseOutlineStroke(Stroke stroke); 564 565 567 575 public Shape getItemShape(int row, int column); 576 577 584 public Shape getSeriesShape(int series); 585 591 public void setShape(Shape shape); 592 593 600 public void setSeriesShape(int series, Shape shape); 601 602 607 public Shape getBaseShape(); 608 609 615 public void setBaseShape(Shape shape); 616 617 619 628 public boolean isItemLabelVisible(int row, int column); 629 630 638 public boolean isSeriesItemLabelsVisible(int series); 639 640 646 public void setItemLabelsVisible(boolean visible); 647 648 654 public void setItemLabelsVisible(Boolean visible); 655 656 665 public void setItemLabelsVisible(Boolean visible, boolean notify); 666 667 673 public void setSeriesItemLabelsVisible(int series, boolean visible); 674 675 681 public void setSeriesItemLabelsVisible(int series, Boolean visible); 682 683 692 public void setSeriesItemLabelsVisible(int series, Boolean visible, 693 boolean notify); 694 695 700 public Boolean getBaseItemLabelsVisible(); 701 702 707 public void setBaseItemLabelsVisible(boolean visible); 708 709 714 public void setBaseItemLabelsVisible(Boolean visible); 715 716 724 public void setBaseItemLabelsVisible(Boolean visible, boolean notify); 725 726 728 736 public XYItemLabelGenerator getItemLabelGenerator(int row, int column); 737 738 745 public XYItemLabelGenerator getSeriesItemLabelGenerator(int series); 746 747 753 public void setItemLabelGenerator(XYItemLabelGenerator generator); 754 755 762 public void setSeriesItemLabelGenerator(int series, 763 XYItemLabelGenerator generator); 764 765 770 public XYItemLabelGenerator getBaseItemLabelGenerator(); 771 772 778 public void setBaseItemLabelGenerator(XYItemLabelGenerator generator); 779 780 782 790 public XYToolTipGenerator getToolTipGenerator(int row, int column); 791 792 799 public XYToolTipGenerator getSeriesToolTipGenerator(int series); 800 801 807 public void setToolTipGenerator(XYToolTipGenerator generator); 808 809 816 public void setSeriesToolTipGenerator(int series, 817 XYToolTipGenerator generator); 818 819 824 public XYToolTipGenerator getBaseToolTipGenerator(); 825 826 832 public void setBaseToolTipGenerator(XYToolTipGenerator generator); 833 834 836 841 public XYURLGenerator getURLGenerator(); 842 843 848 public void setURLGenerator(XYURLGenerator urlGenerator); 849 850 852 860 public Font getItemLabelFont(int row, int column); 861 862 868 public Font getItemLabelFont(); 869 870 878 public void setItemLabelFont(Font font); 879 880 887 public Font getSeriesItemLabelFont(int series); 888 889 896 public void setSeriesItemLabelFont(int series, Font font); 897 898 904 public Font getBaseItemLabelFont(); 905 906 912 public void setBaseItemLabelFont(Font font); 913 914 916 924 public Paint getItemLabelPaint(int row, int column); 925 926 933 public Paint getItemLabelPaint(); 934 935 941 public void setItemLabelPaint(Paint paint); 942 943 950 public Paint getSeriesItemLabelPaint(int series); 951 952 959 public void setSeriesItemLabelPaint(int series, Paint paint); 960 961 966 public Paint getBaseItemLabelPaint(); 967 968 974 public void setBaseItemLabelPaint(Paint paint); 975 976 978 986 public ItemLabelPosition getPositiveItemLabelPosition(int row, int column); 987 988 993 public ItemLabelPosition getPositiveItemLabelPosition(); 994 995 1003 public void setPositiveItemLabelPosition(ItemLabelPosition position); 1004 1005 1012 public void setPositiveItemLabelPosition(ItemLabelPosition position, 1013 boolean notify); 1014 1015 1022 public ItemLabelPosition getSeriesPositiveItemLabelPosition(int series); 1023 1024 1031 public void setSeriesPositiveItemLabelPosition(int series, 1032 ItemLabelPosition position); 1033 1034 1043 public void setSeriesPositiveItemLabelPosition(int series, 1044 ItemLabelPosition position, 1045 boolean notify); 1046 1047 1052 public ItemLabelPosition getBasePositiveItemLabelPosition(); 1053 1054 1059 public void setBasePositiveItemLabelPosition(ItemLabelPosition position); 1060 1061 1068 public void setBasePositiveItemLabelPosition(ItemLabelPosition position, 1069 boolean notify); 1070 1071 1073 1083 public ItemLabelPosition getNegativeItemLabelPosition(int row, int column); 1084 1085 1090 public ItemLabelPosition getNegativeItemLabelPosition(); 1091 1092 1100 public void setNegativeItemLabelPosition(ItemLabelPosition position); 1101 1102 1110 public void setNegativeItemLabelPosition(ItemLabelPosition position, 1111 boolean notify); 1112 1113 1120 public ItemLabelPosition getSeriesNegativeItemLabelPosition(int series); 1121 1122 1129 public void setSeriesNegativeItemLabelPosition(int series, 1130 ItemLabelPosition position); 1131 1132 1141 public void setSeriesNegativeItemLabelPosition(int series, 1142 ItemLabelPosition position, 1143 boolean notify); 1144 1145 1150 public ItemLabelPosition getBaseNegativeItemLabelPosition(); 1151 1152 1158 public void setBaseNegativeItemLabelPosition(ItemLabelPosition position); 1159 1160 1167 public void setBaseNegativeItemLabelPosition(ItemLabelPosition position, 1168 boolean notify); 1169 1170 1177 public void addAnnotation(XYAnnotation annotation); 1178 1179 1185 public void addAnnotation(XYAnnotation annotation, Layer layer); 1186 1187 1197 public boolean removeAnnotation(XYAnnotation annotation); 1198 1199 1203 public void removeAnnotations(); 1204 1205 1215 public void drawAnnotations(Graphics2D g2, 1216 Rectangle2D dataArea, 1217 ValueAxis domainAxis, 1218 ValueAxis rangeAxis, 1219 Layer layer, 1220 PlotRenderingInfo info); 1221 1222 1243 public void drawItem(Graphics2D g2, 1244 XYItemRendererState state, 1245 Rectangle2D dataArea, 1246 PlotRenderingInfo info, 1247 XYPlot plot, 1248 ValueAxis domainAxis, 1249 ValueAxis rangeAxis, 1250 XYDataset dataset, 1251 int series, 1252 int item, 1253 CrosshairState crosshairState, 1254 int pass); 1255 1256 1264 public LegendItem getLegendItem(int datasetIndex, int series); 1265 1266 1271 public XYSeriesLabelGenerator getLegendItemLabelGenerator(); 1272 1273 1278 public void setLegendItemLabelGenerator(XYSeriesLabelGenerator generator); 1279 1280 1291 public void fillDomainGridBand(Graphics2D g2, 1292 XYPlot plot, 1293 ValueAxis axis, 1294 Rectangle2D dataArea, 1295 double start, double end); 1296 1297 1308 public void fillRangeGridBand(Graphics2D g2, 1309 XYPlot plot, 1310 ValueAxis axis, 1311 Rectangle2D dataArea, 1312 double start, double end); 1313 1314 1324 public void drawDomainGridLine(Graphics2D g2, 1325 XYPlot plot, 1326 ValueAxis axis, 1327 Rectangle2D dataArea, 1328 double value); 1329 1330 1342 public void drawRangeLine(Graphics2D g2, 1343 XYPlot plot, 1344 ValueAxis axis, 1345 Rectangle2D dataArea, 1346 double value, 1347 Paint paint, 1348 Stroke stroke); 1349 1350 1359 public void drawDomainMarker(Graphics2D g2, 1360 XYPlot plot, 1361 ValueAxis axis, 1362 Marker marker, 1363 Rectangle2D dataArea); 1364 1365 1374 public void drawRangeMarker(Graphics2D g2, 1375 XYPlot plot, 1376 ValueAxis axis, 1377 Marker marker, 1378 Rectangle2D dataArea); 1379 1380 1385 public XYPlot getPlot(); 1386 1387 1393 public void setPlot(XYPlot plot); 1394 1395 1403 public Range findDomainBounds(XYDataset dataset); 1404 1405 1417 public Range findRangeBounds(XYDataset dataset); 1418 1419 1424 public void addChangeListener(RendererChangeListener listener); 1425 1426 1431 public void removeChangeListener(RendererChangeListener listener); 1432 1433} 1434 | Popular Tags |