The Meta-Environment API

nl.cwi.sen1.visplugin.scatterchart
Class SCVisualizationWindow

java.lang.Object
  extended by nl.cwi.sen1.visplugin.VisualizationPluginWindow
      extended by nl.cwi.sen1.visplugin.scatterchart.SCVisualizationWindow

public class SCVisualizationWindow
extends nl.cwi.sen1.visplugin.VisualizationPluginWindow

scatterChart Plugin VisualisationWindow. Shows a scatter chart. Original code : PieChart plugin ( A. Belgraver, R. van Remortel )

Author:
Raymond Bergen

Field Summary
 
Fields inherited from class nl.cwi.sen1.visplugin.VisualizationPluginWindow
m_factory
 
Constructor Summary
SCVisualizationWindow()
           
 
Method Summary
 org.jfree.data.xy.XYSeriesCollection convertRTupleToDataset(nl.cwi.sen1.relationstores.types.RTuple fact)
          Convert RTuple into a scatterChart Dataset.
private  org.jfree.chart.JFreeChart createscatterChart(java.lang.String title, org.jfree.data.xy.XYSeriesCollection dataset)
          Create the scatter chart.
 java.lang.String getRTupleName(nl.cwi.sen1.relationstores.types.RTuple fact)
          Get the name of the RTuple.
private  boolean isRelIntInt(nl.cwi.sen1.relationstores.types.RTuple fact)
           
 boolean isTypeSupported(nl.cwi.sen1.relationstores.types.RTuple fact)
          Check if a given RType is supported by this visualisation.
 javax.swing.JPanel render(nl.cwi.sen1.relationstores.types.RTuple fact)
          Render the RTuple in a scatter Chart.
 void setFactory(nl.cwi.sen1.relationstores.Factory factory)
          Set a new Factory object, for testing purposes.
 
Methods inherited from class nl.cwi.sen1.visplugin.VisualizationPluginWindow
createExtensionMenu, disconnectComponent, displayVisualization, executeOnLoad, exportToCsv, exportToCsvClicked, exportToImage, factOutOfDate, getController, getFactId, getStoreId, getStudio, getWindowId, initializeWindow, openLocationInEditor, rstoreUnloaded, showPopUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCVisualizationWindow

public SCVisualizationWindow()
Method Detail

render

public javax.swing.JPanel render(nl.cwi.sen1.relationstores.types.RTuple fact)
Render the RTuple in a scatter Chart.

Specified by:
render in class nl.cwi.sen1.visplugin.VisualizationPluginWindow
Parameters:
fact - RTuple with the information
Returns:
JPanel holding the bar chart

setFactory

public void setFactory(nl.cwi.sen1.relationstores.Factory factory)
Set a new Factory object, for testing purposes.

Parameters:
factory - Factory to use

isTypeSupported

public boolean isTypeSupported(nl.cwi.sen1.relationstores.types.RTuple fact)
Check if a given RType is supported by this visualisation.

Parameters:
fact - The facts for which to verify if the type is supported
Returns:
True if it itype is supported

isRelIntInt

private boolean isRelIntInt(nl.cwi.sen1.relationstores.types.RTuple fact)

getRTupleName

public java.lang.String getRTupleName(nl.cwi.sen1.relationstores.types.RTuple fact)
Get the name of the RTuple.

Parameters:
fact - RTuple holding information
Returns:
String holding the name of the tuple

createscatterChart

private org.jfree.chart.JFreeChart createscatterChart(java.lang.String title,
                                                      org.jfree.data.xy.XYSeriesCollection dataset)
Create the scatter chart.

Parameters:
title - Name to display on screen
dataset - Dataset to show
Returns:
a JFreeChart chart

convertRTupleToDataset

public org.jfree.data.xy.XYSeriesCollection convertRTupleToDataset(nl.cwi.sen1.relationstores.types.RTuple fact)
Convert RTuple into a scatterChart Dataset. Supports relation([int,int]) This can be extended to support multiple scatters in a chart

Parameters:
fact - RTuple with the data
Returns:
scatterChart dataset

The Meta-Environment API