view
Class GRunTab

java.lang.Object
  extended by view.GRunTab

public class GRunTab
extends java.lang.Object

Title: Bioinformatics Project

Description: Genomes Comparacent

Copyright: Copyright (c) 2005-2006

GRunTab- Running Genome preprocessing/showing result tab. contains the information on building the GUI of a tab that handles running preprocessing, or viewing results.

Version:
1.0
Author:
Shadi Ibrahem.

Field Summary
private  org.eclipse.swt.widgets.Button CancelButton
          For canceling the operation, and closing the tab.
private  org.eclipse.swt.widgets.Group ChartGroup
          Group that holds the canvas when it is visible.
private  org.eclipse.swt.widgets.Label computingLabel
          A label indicating a process is beeing done.
private  IDataHandler controller_
          Magic controller.
(package private) static org.eclipse.swt.widgets.Display display
          Data View display.
protected  java.lang.String DrawFileName
          String holding the file name of the output that the user wants to present it results.
private  java.lang.String gen1
          First genome short name.
private  java.lang.String gen2
          Second genome short name.
private  org.eclipse.swt.widgets.Group GenomeGroup
          Group containg the label, go button and cancel button, it also holds the progress bar when visible.
private  org.eclipse.swt.widgets.Label genomeNames
          A label clarifying the genomes names which it will run mapping/preprocessing phase on.
private  org.eclipse.swt.widgets.Button goButton
          Runs the actual mapping/preprocssing phase.
private  java.lang.String inputDir
          The preprocessing/mapping input directory.
protected  boolean isParaVisible
          A boolean value indicating if the parameters tab is visible.
private  org.eclipse.swt.events.SelectionListener MapListener
          A listener for the go button that runs the mapping phase.
private  org.eclipse.swt.widgets.Composite MapPComp
          The mapping parameters tab control.
private static java.util.ResourceBundle messages
          Resource bundle, internationalization.
private  org.eclipse.swt.widgets.Button OnlyPreButton
          Check box, an advanced option so that the user can run preprocessing phase only.
private  java.lang.String outDir
          The preprocessing/mapping output directory.
private  org.eclipse.swt.widgets.TabItem ParaMapitem
          Parameters tab mapping item.
private  org.eclipse.swt.widgets.TabItem ParaPreitem
          Parameters tab preprocessing item.
private  org.eclipse.swt.widgets.TabFolder ParaTab
          Tab holding the preprocessing parameters.
 org.eclipse.swt.widgets.ProgressBar PB
          The progress bar, visible only when running a process.
private  org.eclipse.swt.events.SelectionListener PreListener
          A listener for the go button that runs the preprocessing phase.
private  org.eclipse.swt.widgets.Composite PrePComp
          The preprocessing parameters tab control.
 long runMapPid
          Pid for termentation, to enable the user to terminate process, process termination is NOT implemented, see "Developer GuideLine".
 long runPrePid
          Pid for termentation, to enable the user to terminate process, process termination is NOT implemented, see "Developer GuideLine".
private  org.eclipse.swt.custom.CTabItem RunTab
          The tab that will hold the view of the required form.
 java.lang.Runnable setProgress
          A runnable that runs in parallel to a process to indicate it state at each part, it updates the progress bar accordingly.
private static org.eclipse.swt.widgets.Shell shell
          Data View shell.
private  org.eclipse.swt.widgets.Button ShowPButton
          Sets the parameters to be visible so the user can change them.
private  java.lang.String state
          A string that holds the state of process (0-100).
private  org.eclipse.swt.widgets.Group StatisGroup
          Group that holds the statistics when visible.
private  SWTTable[] table
          An array of tables holding tables of the parameters, first 3 of them are pre-processing tables, last 3 are for mapping.
 
Constructor Summary
GRunTab(org.eclipse.swt.custom.CTabFolder MainTab, java.lang.String Gen1, java.lang.String Gen2, IDataHandler cont)
          C'tor, creates the basic view of running pre-processing/mapping phase tab.
 
Method Summary
private  void ClearTables()
          Impties tables, so it can be refilled with new values.
protected  void dispose()
          Disposing a Run tab when exiting or canceling.
 void DrawChart(java.lang.String file, long g1Len, long g2Len, boolean isHeadline)
          Shows the progress bar while drawing process is beeing done, show also the canvas afterwards.
static void PrintMessageToScreen(int i, boolean complex)
          Opens an error message for the user in case mapping process fails , it also specifies the faliure reason.
private  void setMapTable(boolean editable)
          Sets the parameters table according to default values.
private  void setPreTable(boolean editable)
          Sets the parameters table according to default values.
 void setProgressLabel(java.lang.String msg)
          Sets the message during the a process to be "msg".
 void setResultsPage(java.lang.String OutputDir, boolean MapFlag)
          Sets the tab with the adequate view (pre/map/result).
 void setSelected(org.eclipse.swt.custom.CTabFolder mainTab)
          Sets the tab to be selected in the main tab of magic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller_

private IDataHandler controller_
Magic controller.


isParaVisible

protected boolean isParaVisible
A boolean value indicating if the parameters tab is visible.


table

private SWTTable[] table
An array of tables holding tables of the parameters, first 3 of them are pre-processing tables, last 3 are for mapping.


PrePComp

private org.eclipse.swt.widgets.Composite PrePComp
The preprocessing parameters tab control.


MapPComp

private org.eclipse.swt.widgets.Composite MapPComp
The mapping parameters tab control.


goButton

private org.eclipse.swt.widgets.Button goButton
Runs the actual mapping/preprocssing phase.


CancelButton

private org.eclipse.swt.widgets.Button CancelButton
For canceling the operation, and closing the tab.


genomeNames

private org.eclipse.swt.widgets.Label genomeNames
A label clarifying the genomes names which it will run mapping/preprocessing phase on.


gen1

private java.lang.String gen1
First genome short name.


gen2

private java.lang.String gen2
Second genome short name.


GenomeGroup

private org.eclipse.swt.widgets.Group GenomeGroup
Group containg the label, go button and cancel button, it also holds the progress bar when visible.


ShowPButton

private org.eclipse.swt.widgets.Button ShowPButton
Sets the parameters to be visible so the user can change them.


ParaTab

private org.eclipse.swt.widgets.TabFolder ParaTab
Tab holding the preprocessing parameters.


ChartGroup

private org.eclipse.swt.widgets.Group ChartGroup
Group that holds the canvas when it is visible.


OnlyPreButton

private org.eclipse.swt.widgets.Button OnlyPreButton
Check box, an advanced option so that the user can run preprocessing phase only.


RunTab

private org.eclipse.swt.custom.CTabItem RunTab
The tab that will hold the view of the required form.


computingLabel

private org.eclipse.swt.widgets.Label computingLabel
A label indicating a process is beeing done.


PB

public org.eclipse.swt.widgets.ProgressBar PB
The progress bar, visible only when running a process.


state

private java.lang.String state
A string that holds the state of process (0-100).


setProgress

public java.lang.Runnable setProgress
A runnable that runs in parallel to a process to indicate it state at each part, it updates the progress bar accordingly.


messages

private static java.util.ResourceBundle messages
Resource bundle, internationalization.


PreListener

private org.eclipse.swt.events.SelectionListener PreListener
A listener for the go button that runs the preprocessing phase.


MapListener

private org.eclipse.swt.events.SelectionListener MapListener
A listener for the go button that runs the mapping phase.


outDir

private java.lang.String outDir
The preprocessing/mapping output directory.


inputDir

private java.lang.String inputDir
The preprocessing/mapping input directory.


ParaPreitem

private org.eclipse.swt.widgets.TabItem ParaPreitem
Parameters tab preprocessing item.


ParaMapitem

private org.eclipse.swt.widgets.TabItem ParaMapitem
Parameters tab mapping item.


StatisGroup

private org.eclipse.swt.widgets.Group StatisGroup
Group that holds the statistics when visible.


DrawFileName

protected java.lang.String DrawFileName
String holding the file name of the output that the user wants to present it results.


runPrePid

public long runPrePid
Pid for termentation, to enable the user to terminate process, process termination is NOT implemented, see "Developer GuideLine".


runMapPid

public long runMapPid
Pid for termentation, to enable the user to terminate process, process termination is NOT implemented, see "Developer GuideLine".


shell

private static org.eclipse.swt.widgets.Shell shell
Data View shell.


display

static org.eclipse.swt.widgets.Display display
Data View display.

Constructor Detail

GRunTab

public GRunTab(org.eclipse.swt.custom.CTabFolder MainTab,
               java.lang.String Gen1,
               java.lang.String Gen2,
               IDataHandler cont)
C'tor, creates the basic view of running pre-processing/mapping phase tab.

Parameters:
MainTab - CTabFolder: that main tab from the data view.
Gen1 - String: 1st genome short name.
Gen2 - String: 2nd genome short name.
cont - IDataHandler: the controller of magic.
Method Detail

PrintMessageToScreen

public static void PrintMessageToScreen(int i,
                                        boolean complex)
Opens an error message for the user in case mapping process fails , it also specifies the faliure reason.

Parameters:
i - int: the mapping process returned status.

dispose

protected void dispose()
Disposing a Run tab when exiting or canceling.


setPreTable

private void setPreTable(boolean editable)
Sets the parameters table according to default values.

Parameters:
editable - boolean, true if the tab is ment to be used for running preprocessing.

setMapTable

private void setMapTable(boolean editable)
Sets the parameters table according to default values.

Parameters:
editable - true if the tab is for running preprocessing/mapping phase.

setResultsPage

public void setResultsPage(java.lang.String OutputDir,
                           boolean MapFlag)
Sets the tab with the adequate view (pre/map/result).

Parameters:
OutputDir - String: the output directory.
MapFlag - boolean: indicates if the tab is used for running the mapping phase.

DrawChart

public void DrawChart(java.lang.String file,
                      long g1Len,
                      long g2Len,
                      boolean isHeadline)
Shows the progress bar while drawing process is beeing done, show also the canvas afterwards.

Parameters:
file - String:the input file for the drawing.
g1Len - String:the 1st genome length.
g2Len - String:the 2nd genome length.
isHeadline -

ClearTables

private void ClearTables()
Impties tables, so it can be refilled with new values.


setSelected

public void setSelected(org.eclipse.swt.custom.CTabFolder mainTab)
Sets the tab to be selected in the main tab of magic.

Parameters:
mainTab - CTabFolder: the tab holding all the items of magic.

setProgressLabel

public void setProgressLabel(java.lang.String msg)
Sets the message during the a process to be "msg".

Parameters:
msg - String: given string.