fable.framework.ui.views
Class ColFileXYPlot

java.lang.Object
  extended by fable.framework.ui.views.ColFileXYPlot
All Implemented Interfaces:
fr.esrf.tangoatk.widget.util.chart.IJLChartListener, java.io.Serializable, java.util.EventListener

public class ColFileXYPlot
extends java.lang.Object
implements fr.esrf.tangoatk.widget.util.chart.IJLChartListener

Since:
19-05-2005 : keep or remove selected dots
Author:
Andy Gotz + Gaelle Suchet
See Also:
Serialized Form

Field Summary
 org.eclipse.swt.widgets.Button updateButton
           
 
Constructor Summary
ColFileXYPlot(org.eclipse.swt.widgets.Composite parent, java.lang.String name, java.lang.String xLabel, java.lang.String yLabel)
          ColFileXYPlot constructor
 
Method Summary
 void addColumnFile(ColumnFile col)
          Add a new columnFile object in the plot if it doesn't exist.
 void addDataView(fr.esrf.tangoatk.widget.util.chart.JLDataView dtV)
           
 void clearAllPlots()
          Clear all plots
 java.lang.String[] clickOnChart(fr.esrf.tangoatk.widget.util.chart.JLChartEvent e)
          This function customize the value popup (request July 2008) Seen in JLchart snippet
 void createChart()
          Create the JLChart and initialize it with default settings e.g.
 void dispose()
          Dispose method, even though this is not a SWT Control.
 fr.esrf.tangoatk.widget.util.chart.JLChart getChart()
           
 javax.swing.JApplet getChartContainer()
           
 fr.esrf.tangoatk.widget.util.chart.JLDataView getCurrentDataView()
           
 boolean getOptionsShowing()
           
 java.util.Vector<fr.esrf.tangoatk.widget.util.chart.JLDataView> getVectordataview()
           
 int[] markSelectedRows(double[] id, java.lang.String name)
          This method returns indices of the spot identified by its id and adds a new JLDatView to display theses spots in a different color
 void plotData(java.lang.String[] xyLabel)
           
 void populateListsKeys(ColumnFile col)
          Initialise x and y keys combo box with values to plot
 void removeDataView(fr.esrf.tangoatk.widget.util.chart.JLDataView dv)
           
 void repaint()
           
 void setOptionsShowing(boolean optionsShowing)
          Set whether plot options are showing or not.
 void setSxAxisLabel(java.lang.String sxAxisLabel)
          Set x axis label
 void setSyAxisLabel(java.lang.String syAxisLabel)
          Set y axis label
 void updateChart()
          Update the plot with the data from the currently selected ColumnFile and the currently selected indices.
 fr.esrf.tangoatk.widget.util.chart.JLDataView updateChart(double[] x, double[] y)
          Add a new data set with x and y values
 void updateColumnFile(ColumnFile col)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

updateButton

public org.eclipse.swt.widgets.Button updateButton
Constructor Detail

ColFileXYPlot

public ColFileXYPlot(org.eclipse.swt.widgets.Composite parent,
                     java.lang.String name,
                     java.lang.String xLabel,
                     java.lang.String yLabel)
ColFileXYPlot constructor

Parameters:
parent - - composite
name - -chart name
yLabel - - y label name
xLabel - - x label name
Method Detail

setSyAxisLabel

public void setSyAxisLabel(java.lang.String syAxisLabel)
Set y axis label

Parameters:
syAxisLabel -

setSxAxisLabel

public void setSxAxisLabel(java.lang.String sxAxisLabel)
Set x axis label

Parameters:
sxAxisLabel -

populateListsKeys

public void populateListsKeys(ColumnFile col)
Initialise x and y keys combo box with values to plot

Parameters:
colandValues -
Since:
added job when columnFile is loaded, to avoid invalid thread acces fill combo in display thread.

clearAllPlots

public void clearAllPlots()
Clear all plots


createChart

public void createChart()
Create the JLChart and initialize it with default settings e.g. autoscale.


clickOnChart

public java.lang.String[] clickOnChart(fr.esrf.tangoatk.widget.util.chart.JLChartEvent e)
This function customize the value popup (request July 2008) Seen in JLchart snippet

Specified by:
clickOnChart in interface fr.esrf.tangoatk.widget.util.chart.IJLChartListener

markSelectedRows

public int[] markSelectedRows(double[] id,
                              java.lang.String name)
This method returns indices of the spot identified by its id and adds a new JLDatView to display theses spots in a different color

Parameters:
a - list of spot id
name - the name of the id
Returns:
a list of index with all ids

updateChart

public void updateChart()
Update the plot with the data from the currently selected ColumnFile and the currently selected indices.


updateChart

public fr.esrf.tangoatk.widget.util.chart.JLDataView updateChart(double[] x,
                                                                 double[] y)
Add a new data set with x and y values


updateColumnFile

public void updateColumnFile(ColumnFile col)

addColumnFile

public void addColumnFile(ColumnFile col)
Add a new columnFile object in the plot if it doesn't exist. Otherwise, update plot.

Parameters:
col -

addDataView

public void addDataView(fr.esrf.tangoatk.widget.util.chart.JLDataView dtV)

removeDataView

public void removeDataView(fr.esrf.tangoatk.widget.util.chart.JLDataView dv)

repaint

public void repaint()

getChart

public fr.esrf.tangoatk.widget.util.chart.JLChart getChart()
Returns:
this chart

getChartContainer

public javax.swing.JApplet getChartContainer()

getVectordataview

public java.util.Vector<fr.esrf.tangoatk.widget.util.chart.JLDataView> getVectordataview()

getCurrentDataView

public fr.esrf.tangoatk.widget.util.chart.JLDataView getCurrentDataView()

plotData

public void plotData(java.lang.String[] xyLabel)
Parameters:
xyLabel -

dispose

public void dispose()
Dispose method, even though this is not a SWT Control. Should be called by users of this class when they are finished with it. May not be implemented completely properly, but removes listeners.


getOptionsShowing

public boolean getOptionsShowing()
Returns:
Whether plot options are showing or not.

setOptionsShowing

public void setOptionsShowing(boolean optionsShowing)
Set whether plot options are showing or not.

Parameters:
optionsShowing - Whether to show plot options.