Class VennDiagramPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class VennDiagramPanel
extends JPanel
A panel displaying a Venn diagram based on the provided data.
Author:
Harald Barsnes.
See Also:
Serialized Form
  • Constructor Details

    • VennDiagramPanel

      public VennDiagramPanel​(ArrayList<String> a, ArrayList<String> b, ArrayList<String> c, ArrayList<String> d, String groupA, String groupB, String groupC, String groupD, Color datasetAColor, Color datasetBColor, Color datasetCColor, Color datasetDColor)
      Creates a new VennDiagramPanel.
      Parameters:
      a - dataset A
      b - dataset B
      c - dataset C
      d - dataset D
      groupA - the name for dataset A
      groupB - the name for dataset B
      groupC - the name for dataset C
      groupD - the name for dataset D
      datasetAColor - the color for dataset A
      datasetBColor - the color for dataset B
      datasetCColor - the color for dataset C
      datasetDColor - the color for dataset D
  • Method Details

    • updatePlot

      public void updatePlot()
      Update the plot.
    • getEntitiesForPoint

      public ArrayList<org.jfree.chart.entity.ChartEntity> getEntitiesForPoint​(int viewX, int viewY)
      Returns a list of the entities at the given x, y view location.
      Parameters:
      viewX - the x location
      viewY - the y location
      Returns:
      a list of the entities
    • getChartPanel

      public org.jfree.chart.ChartPanel getChartPanel()
      Returns the chart panel.
      Returns:
      the chart panel
    • getGroupNames

      public HashMap<String,​String> getGroupNames()
      Returns a standard map of the group names. Keys: a, b, c and d.
      Returns:
      a standard map of the group names
    • getLegendDatasetAThreeWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetAThreeWay()
      Returns the legend location of Dataset A in a three way Venn diagram.
      Returns:
      the legendDatasetAThreeWay
    • setLegendDatasetAThreeWay

      public void setLegendDatasetAThreeWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetAThreeWay)
      Set the legend location of Dataset A in a three way Venn diagram.
      Parameters:
      legendDatasetAThreeWay - the legendDatasetAThreeWay to set
    • getLegendDatasetBThreeWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetBThreeWay()
      Returns the legend location of dataset B in a three way Venn diagram.
      Returns:
      the legendDatasetBThreeWay
    • setLegendDatasetBThreeWay

      public void setLegendDatasetBThreeWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetBThreeWay)
      Set the legend location of Dataset B in a three way Venn diagram.
      Parameters:
      legendDatasetBThreeWay - the legendDatasetBThreeWay to set
    • getLegendDatasetCThreeWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetCThreeWay()
      Returns the legend location of dataset C in a three way Venn diagram.
      Returns:
      the legendDatasetCThreeWay
    • setLegendDatasetCThreeWay

      public void setLegendDatasetCThreeWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetCThreeWay)
      Set the legend location of Dataset C in a three way Venn diagram.
      Parameters:
      legendDatasetCThreeWay - the legendDatasetCThreeWay to set
    • getLegendDatasetAFourWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetAFourWay()
      Returns the legend location of dataset A in a four way Venn diagram.
      Returns:
      the legendDatasetAFourWay
    • setLegendDatasetAFourWay

      public void setLegendDatasetAFourWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetAFourWay)
      Set the legend location of Dataset A in a four way Venn diagram.
      Parameters:
      legendDatasetAFourWay - the legendDatasetAFourWay to set
    • getLegendDatasetBFourWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetBFourWay()
      Returns the legend location of dataset B in a four way Venn diagram.
      Returns:
      the legendDatasetBFourWay
    • setLegendDatasetBFourWay

      public void setLegendDatasetBFourWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetBFourWay)
      Set the legend location of Dataset B in a four way Venn diagram.
      Parameters:
      legendDatasetBFourWay - the legendDatasetBFourWay to set
    • getLegendDatasetCFourWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetCFourWay()
      Returns the legend location of dataset C in a four way Venn diagram.
      Returns:
      the legendDatasetCFourWay
    • setLegendDatasetCFourWay

      public void setLegendDatasetCFourWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetCFourWay)
      Set the legend location of Dataset C in a four way Venn diagram.
      Parameters:
      legendDatasetCFourWay - the legendDatasetCFourWay to set
    • getLegendDatasetDFourWay

      public no.uib.jsparklines.data.XYDataPoint getLegendDatasetDFourWay()
      Returns the legend location of dataset D in a four way Venn diagram.
      Returns:
      the legendDatasetDFourWay
    • setLegendDatasetDFourWay

      public void setLegendDatasetDFourWay​(no.uib.jsparklines.data.XYDataPoint legendDatasetDFourWay)
      Set the legend location of Dataset D in a four way Venn diagram.
      Parameters:
      legendDatasetDFourWay - the legendDatasetDFourWay to set
    • getCurrentVennDiagramType

      public VennDiagramPanel.VennDiagramType getCurrentVennDiagramType()
      Returns the current Venn diagram type.
      Returns:
      the currentVennDiagramType
    • resizePlot

      public void resizePlot​(int parentWidth, int parentHeight)
    • showLegend

      public boolean showLegend()
      Show the legend or not.
      Returns:
      show the legend or not
    • setShowLegend

      public void setShowLegend​(boolean showLegend)
      Set if the legend is to be shown.
      Parameters:
      showLegend - if the legend is to be shown
    • getFontSize

      public int getFontSize()
      Get the font size.
      Returns:
      the font size
    • setFontSize

      public void setFontSize​(int fontSizeValues)
      Set the font size.
      Parameters:
      fontSizeValues - the font size
    • getFontSizeLegend

      public int getFontSizeLegend()
      Get the font size for the legend.
      Returns:
      the font size for the legend
    • setFontSizeLegend

      public void setFontSizeLegend​(int fontSizeLegend)
      Set the font size of the legend.
      Parameters:
      fontSizeLegend - the font size of the legend