Class DAbstractChartType

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jfree.chart.ChartPanel
org.kopi.vkopi.lib.ui.swing.chart.DAbstractChartType
All Implemented Interfaces:
ActionListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Printable, Serializable, EventListener, Accessible, org.jfree.chart.event.ChartChangeListener, org.jfree.chart.event.ChartProgressListener, org.jfree.chart.event.OverlayChangeListener, org.kopi.galite.visual.base.UComponent, org.kopi.galite.visual.chart.UChartType
Direct Known Subclasses:
DAreaChart, DColumnChart, DLineChart, DPieChart

public abstract class DAbstractChartType extends org.jfree.chart.ChartPanel implements org.kopi.galite.visual.chart.UChartType
See Also:
  • Constructor Details

    • DAbstractChartType

      protected DAbstractChartType(String title, org.kopi.galite.visual.chart.VDataSeries[] series)
      Creates a new abstract chart type instance.
      Parameters:
      title - The chart title.
      series - The data series.
  • Method Details

    • build

      public void build()
      Specified by:
      build in interface org.kopi.galite.visual.chart.UChartType
    • createDataset

      protected org.jfree.data.category.CategoryDataset createDataset(org.kopi.galite.visual.chart.VDataSeries[] series)
      Creates the category data set for the chart.
      Parameters:
      series - The data series.
      Returns:
      The category data set for the chart.
    • writeAsPDF

      protected void writeAsPDF(OutputStream destination, int width, int height, int marginLeft, int marginRight, int marginTop, int marginBottom, com.lowagie.text.pdf.FontMapper mapper) throws IOException
      Writes the chart as PDF document.
      Parameters:
      destination - The destination stream.
      width - The page width.
      height - The page height.
      marginLeft - The margin left.
      marginRight - The margin right.
      marginTop - The margin top.
      marginBottom - The margin buttom.
      mapper - The font mapper.
      Throws:
      IOException - I/O errors.
    • getPlotBackground

      protected Color getPlotBackground()
      Returns the plot background color.
      Returns:
      The plot background color.
    • getChartBackground

      protected Color getChartBackground()
      Returns the chart background color.
      Returns:
      The chart background color.
    • getGridLineColor

      protected Color getGridLineColor()
      Returns the grid line color.
      Returns:
      The grid line color.
    • createChart

      protected abstract org.jfree.chart.JFreeChart createChart(String title, org.kopi.galite.visual.chart.VDataSeries[] series)
      Creates the chart object from the given chart title and chart data.
      Parameters:
      title - The chart title.
      series - The chart series.
      Returns:
      The chart object.