fable.framework.navigator.views
Class SampleNavigatorView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by fable.framework.navigator.views.SampleNavigatorView
All Implemented Interfaces:
java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.jface.util.IPropertyChangeListener, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class SampleNavigatorView
extends org.eclipse.ui.part.ViewPart
implements org.eclipse.jface.util.IPropertyChangeListener


Field Summary
static SampleController controller
          This singleton is the model controller.
static java.lang.String ID
           
static java.lang.String INITIAL_DIR_DATA
           
static SampleNavigatorView view
          Uniq instance of this view SampleNavigatorView.
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
SampleNavigatorView()
           
 
Method Summary
 void addDirectory(java.lang.String directory)
          This function is called when a directory is selected.
 void addFiles(java.lang.String[] files, java.lang.String directory)
          REPLACE FILEANDDIRECTORYDIALOG
 void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
          19 sept.
 void clearFiles()
          clear the table of files to process
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
           
 void dispose()
           
 Sample getCurrentSample()
           
static SampleNavigatorView getDefault()
          return default processing view
 java.lang.String getExperimentName()
           
 java.lang.String getFilter()
           
static java.lang.String getInitialDirectory()
           
 org.eclipse.core.runtime.jobs.Job getJob()
           
 java.lang.String getSampleName()
           
 java.util.Vector<java.lang.Integer> getSelectedFilesIndex()
          Get the list of selected files in the sample navigator's file table and return the indices corresponding to their position in the vector of FabioFiles.
 java.util.Vector<FabioFile> getSortedfiles()
           
 void initSampleFilteredFiles(Sample sample)
          This method init fabio filtered peaks file in Sample object.
static void loadInitialDirectory()
          restore the initial directory from the directory.xml memento store
 java.io.File[] loadSample(java.lang.String dir)
          23 oct.
 void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
          To show required fields when a property change in another view (for instance, launched when preprocessor is launched without any files)
 void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
          19 sept.
static void saveInitialDirectory()
          save the initial directory in the directory.xml memento store
 void setExperimentAndSampleName(java.lang.String directory)
           
 void setExperimentName(java.lang.String experimentName)
           
 void setFilter(java.lang.String filter)
           
 void setFocus()
           
static void setInitialDirectory(java.lang.String _initialDirectory)
           
 void setSampleName(java.lang.String sampleName)
           
 void setSelectedFiles(java.lang.String[] newFiles)
          update the list of selected files to display
 void updateDirectory()
          This function update a directory if new files have been added.
 
Methods inherited from class org.eclipse.ui.part.ViewPart
getViewSite, init, init, saveState, setInitializationData
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, getAdapter, getContentDescription, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, showBusy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values

INITIAL_DIR_DATA

public static final java.lang.String INITIAL_DIR_DATA
See Also:
Constant Field Values

view

public static SampleNavigatorView view
Uniq instance of this view SampleNavigatorView.


controller

public static SampleController controller
This singleton is the model controller.

Constructor Detail

SampleNavigatorView

public SampleNavigatorView()
Method Detail

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Specified by:
createPartControl in class org.eclipse.ui.part.WorkbenchPart

getSelectedFilesIndex

public java.util.Vector<java.lang.Integer> getSelectedFilesIndex()
Get the list of selected files in the sample navigator's file table and return the indices corresponding to their position in the vector of FabioFiles.

Returns:
- list of file indices as an array of int

getDefault

public static SampleNavigatorView getDefault()
return default processing view

Returns:
default processing view

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Specified by:
setFocus in class org.eclipse.ui.part.WorkbenchPart

setSelectedFiles

public void setSelectedFiles(java.lang.String[] newFiles)
update the list of selected files to display

Parameters:
String - [] newFiles - list of selected files

addPropertyChangeListener

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

Parameters:
listener -

removePropertyChangeListener

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

Parameters:
listener -

clearFiles

public void clearFiles()
clear the table of files to process


loadSample

public java.io.File[] loadSample(java.lang.String dir)
23 oct. 07

Parameters:
dir -

getExperimentName

public java.lang.String getExperimentName()

setExperimentName

public void setExperimentName(java.lang.String experimentName)

getSampleName

public java.lang.String getSampleName()

setSampleName

public void setSampleName(java.lang.String sampleName)

setExperimentAndSampleName

public void setExperimentAndSampleName(java.lang.String directory)

addFiles

public void addFiles(java.lang.String[] files,
                     java.lang.String directory)
REPLACE FILEANDDIRECTORYDIALOG


updateDirectory

public void updateDirectory()
This function update a directory if new files have been added. New since 29/07/2008.


addDirectory

public void addDirectory(java.lang.String directory)
This function is called when a directory is selected.

It gets all files with the type set in preferences to fill left table. If a filter exists and if the user has checked "set filter for all samples" a filter on the name is set.

Parameters:
directory -

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.part.WorkbenchPart

getInitialDirectory

public static java.lang.String getInitialDirectory()

setInitialDirectory

public static void setInitialDirectory(java.lang.String _initialDirectory)

loadInitialDirectory

public static void loadInitialDirectory()
restore the initial directory from the directory.xml memento store


saveInitialDirectory

public static void saveInitialDirectory()
save the initial directory in the directory.xml memento store


propertyChange

public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
To show required fields when a property change in another view (for instance, launched when preprocessor is launched without any files)

Specified by:
propertyChange in interface org.eclipse.jface.util.IPropertyChangeListener
Parameters:
event -

getCurrentSample

public Sample getCurrentSample()

getJob

public org.eclipse.core.runtime.jobs.Job getJob()

getFilter

public java.lang.String getFilter()

setFilter

public void setFilter(java.lang.String filter)

initSampleFilteredFiles

public void initSampleFilteredFiles(Sample sample)
This method init fabio filtered peaks file in Sample object.


getSortedfiles

public java.util.Vector<FabioFile> getSortedfiles()