fable.framework.navigator.controller
Class SampleController

java.lang.Object
  extended by fable.framework.navigator.controller.SampleController
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.util.IPropertyChangeListener

public class SampleController
extends java.lang.Object
implements org.eclipse.jface.util.IPropertyChangeListener

Author:
suchet

Method Summary
 void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
           
 void addSample(Sample s)
           
 void fireAddSample()
           
 void fireCurrentFileHasChanged()
           
 void fireCurrentSample(int index)
           
 void fireSampleRemoved(Sample s)
           
 void fireUpdateFiles()
          This event is sent if a sample has new files.
 void fireUpdatePlot()
           
static SampleController getController()
           
 FabioFile getCurrentFile()
          23 oct.
 int getCurrentFileIndex()
           
 Sample getCurrentsample()
           
 int getCurrentsampleIndex()
           
 void getFirstImage()
          Send an event to all SampleController listener to do something with the first image.
 java.lang.String[] getKeys()
           
 void getLastImage()
          Send an event to all SampleController listener to do something with the last image.
 Sample getLastSample()
           
 void getNext(int i)
           
 int getNumberOfSample()
           
 java.util.Vector<Sample> getSamples()
           
 void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
           
 void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
           
 void removeSample(int index)
           
 void removeSample(Sample s)
           
 void setCurrentFileIndex(int index)
          23 oct.
 void setCurrentSample(Sample s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKeys

public java.lang.String[] getKeys()
                           throws SampleException
Throws:
SampleException

getController

public static SampleController getController()

addSample

public void addSample(Sample s)

setCurrentSample

public void setCurrentSample(Sample s)

getCurrentsample

public Sample getCurrentsample()

getCurrentsampleIndex

public int getCurrentsampleIndex()

getNumberOfSample

public int getNumberOfSample()

getLastSample

public Sample getLastSample()

removeSample

public void removeSample(int index)

removeSample

public void removeSample(Sample s)

getCurrentFileIndex

public int getCurrentFileIndex()

setCurrentFileIndex

public void setCurrentFileIndex(int index)
23 oct. 07

Parameters:
index - edf index in sample

getCurrentFile

public FabioFile getCurrentFile()
23 oct. 07

Returns:
currentFile if exists, else if one sample at least exists, return the first element of the last sample loaded

addPropertyChangeListener

public void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)

fireCurrentFileHasChanged

public void fireCurrentFileHasChanged()

fireSampleRemoved

public void fireSampleRemoved(Sample s)

fireCurrentSample

public void fireCurrentSample(int index)

fireAddSample

public void fireAddSample()

fireUpdatePlot

public void fireUpdatePlot()

fireUpdateFiles

public void fireUpdateFiles()
This event is sent if a sample has new files.


propertyChange

public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
Specified by:
propertyChange in interface org.eclipse.jface.util.IPropertyChangeListener

getSamples

public java.util.Vector<Sample> getSamples()

getNext

public void getNext(int i)
Parameters:
i - 1 to get next image or -1 to get previous image

getFirstImage

public void getFirstImage()
Send an event to all SampleController listener to do something with the first image. See example in PeaksSptView.


getLastImage

public void getLastImage()
Send an event to all SampleController listener to do something with the last image. See example in PeaksSptView.