view
Class ParametersFrame

java.lang.Object
  extended by view.ParametersFrame

public class ParametersFrame
extends java.lang.Object

Title: Bioinformatics Project

Description: Genomes Comparacent

Copyright: Copyright (c) 2005-2006

ParametersFrame is the class that sets the values and text in the parameters tab, saves changes , and restores default values.

Version:
1.0
Author:
Shadi Ibrahem.

Field Summary
private  org.eclipse.swt.widgets.Label bp1Label
          "bp" label.
private  org.eclipse.swt.widgets.Label bp2Label
          "bp" label.
private  org.eclipse.swt.widgets.Label bp3Label
          "bp" label.
private  org.eclipse.swt.widgets.Label bp4Label
          "bp" label.
private  org.eclipse.swt.widgets.Label bp5Label
          "bp" label.
private  double cleanISPerc
          Default parameter.
private  org.eclipse.swt.widgets.Label cleanISPerclabel
          Parameter label.
private  org.eclipse.swt.widgets.Text cleanISPerctext
          Text field for the parameter.
private  double cleanMinLen
          Default parameter.
private  org.eclipse.swt.widgets.Label cleanMinLenlabel
          Parameter label.
private  org.eclipse.swt.widgets.Text cleanMinLentext
          Text field for the parameter.
private  double cleanProPerc
          Default parameter.
private  org.eclipse.swt.widgets.Label cleanProPerclabel
          Parameter label.
private  org.eclipse.swt.widgets.Text cleanProPerctext
          Text field for the parameter.
private  IDataHandler controller_
          Magic controller.
private  double dupPerc
          Parameters set by the user.
private  org.eclipse.swt.widgets.Label dupPerclabel
          Parameter label.
private  org.eclipse.swt.widgets.Text dupPerctext
          Text field for the parameter.
private  double eval
          Default parameter.
private  org.eclipse.swt.widgets.Label evallabel
          Parameter label.
private  org.eclipse.swt.widgets.Text evaltext
          Text field for the parameter.
private  long gapExtractLength
          Default parameter.
private  org.eclipse.swt.widgets.Label gapExtractLengthlabel
          Parameter label.
private  org.eclipse.swt.widgets.Text gapExtractLengthtext
          Text field for the parameter.
private  long gapJoinLength
          Default parameter.
private  org.eclipse.swt.widgets.Label gapJoinLengthlabel
          Parameter label.
private  org.eclipse.swt.widgets.Text gapJoinLengthtext
          Text field for the parameter.
private  org.eclipse.swt.widgets.Group group1
          Parameters group: includes texts/labels.
private  org.eclipse.swt.widgets.Group group2
          Parameters group: includes texts/labels.
private  org.eclipse.swt.widgets.Group group3
          Parameters group: includes texts/labels.
private  org.eclipse.swt.widgets.Group group4
          Parameters group: includes texts/labels.
private  org.eclipse.swt.widgets.Group group5
          Parameters group: includes texts/labels.
private  org.eclipse.swt.widgets.Group group6
          Parameters group: includes texts/labels.
private  org.eclipse.swt.widgets.TabItem item1
          Preprocessing parametrs tab item.
private  org.eclipse.swt.widgets.TabItem item2
          mapping parametrs tab item.
private  org.eclipse.swt.custom.CTabFolder MainTF
          Magic main tab folder.
private  org.eclipse.swt.custom.CTabItem MainTI
          Magic main tab item.
private  org.eclipse.swt.widgets.Button OKButton
          A button.
private  org.eclipse.swt.widgets.Button OKButton2
          A button.
private  double orthPerc
          Parameters set by the user.
private  org.eclipse.swt.widgets.Label orthPerclabel
          Parameter label.
private  org.eclipse.swt.widgets.Text orthPerctext
          Text field for the parameter.
private  org.eclipse.swt.widgets.Composite paratab
          Parameters tab item control.
private  org.eclipse.swt.widgets.Label Per1Label
          "%" label.
private  org.eclipse.swt.widgets.Label Per2Label
          "%" label.
(package private)  org.eclipse.swt.widgets.Shell Pshell
          DataView shell.
private  org.eclipse.swt.widgets.Button RestoreDefaultButton1
          A button.
private  org.eclipse.swt.widgets.Button RestoreDefaultButton2
          A button.
private  org.eclipse.swt.widgets.Label sep1
          Seperator.
private  long stitchDifference
          Default parameter.
private  org.eclipse.swt.widgets.Label stitchDifferencelabel
          Parameter label.
private  org.eclipse.swt.widgets.Text stitchDifferencetext
          Text field for the parameter.
private  long stitchDistance
          Default parameter.
private  org.eclipse.swt.widgets.Label stitchDistancelabel
          Parameter label.
private  org.eclipse.swt.widgets.Text stitchDistancetext
          Text field for the parameter.
private  long stitchMinLength
          Default parameter.
private  org.eclipse.swt.widgets.Label stitchMinLengthlabel
          Parameter label.
private  org.eclipse.swt.widgets.Text stitchMinLengthtext
          Text field for the parameter.
private  org.eclipse.swt.widgets.TabFolder tabFolder1
          Parameters tab folder.
private  double UcleanISPerc
          Parameters set by the user.
private  double UcleanMinLen
          Parameters set by the user.
private  double UcleanProPerc
          Parameters set by the user.
private  double UdupPerc
          Parameters set by the user.
private  double Ueval
          Parameters set by the user.
private  long UgapExtractLength
          Parameters set by the user.
private  long UgapJoinLength
          Parameters set by the user.
private  double UorthPerc
          Parameters set by the user.
private  long UstitchDifference
          Parameters set by the user.
private  long UstitchDistance
          Parameters set by the user.
private  long UstitchMinLength
          Parameters set by the user.
 
Constructor Summary
ParametersFrame(org.eclipse.swt.custom.CTabFolder tabF, org.eclipse.swt.custom.CTabItem tabI, org.eclipse.swt.widgets.Shell shell, IDataHandler cont)
          C'tor, initiates parameters tab with the default groups/texts/labels and contructs the buttons.
 
Method Summary
 void getParametersFromINI(Magic magic)
          Extract default parameters from Magic data structure.
private  void setMappingDefaultVals()
          Restores Magic contant mapping parameters.
 void setParametersINI(java.lang.String OutputIni, java.lang.String inputDir, java.lang.String outputDir, java.lang.String Lang)
          Write user parameters into Magic.ini file.
private  void setPreProccesingDefaultVals()
          Restores Magic contant preprocessing parameters.
protected  void setUserParameters()
          Sets parameters entered by the user to default, also stores data in the "Magic.ini" file.
 void show(org.eclipse.swt.custom.CTabItem paraitem)
          Sets parameters tabitem to be paraitem, and its control paratab.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gapExtractLength

private final long gapExtractLength
Default parameter.

See Also:
Constant Field Values

gapJoinLength

private final long gapJoinLength
Default parameter.

See Also:
Constant Field Values

stitchDifference

private final long stitchDifference
Default parameter.

See Also:
Constant Field Values

stitchMinLength

private final long stitchMinLength
Default parameter.

See Also:
Constant Field Values

stitchDistance

private final long stitchDistance
Default parameter.

See Also:
Constant Field Values

eval

private final double eval
Default parameter.

See Also:
Constant Field Values

cleanISPerc

private final double cleanISPerc
Default parameter.

See Also:
Constant Field Values

cleanProPerc

private final double cleanProPerc
Default parameter.

See Also:
Constant Field Values

cleanMinLen

private final double cleanMinLen
Default parameter.

See Also:
Constant Field Values

Pshell

org.eclipse.swt.widgets.Shell Pshell
DataView shell.


gapExtractLengthtext

private org.eclipse.swt.widgets.Text gapExtractLengthtext
Text field for the parameter.


gapJoinLengthtext

private org.eclipse.swt.widgets.Text gapJoinLengthtext
Text field for the parameter.


stitchDifferencetext

private org.eclipse.swt.widgets.Text stitchDifferencetext
Text field for the parameter.


stitchMinLengthtext

private org.eclipse.swt.widgets.Text stitchMinLengthtext
Text field for the parameter.


stitchDistancetext

private org.eclipse.swt.widgets.Text stitchDistancetext
Text field for the parameter.


evaltext

private org.eclipse.swt.widgets.Text evaltext
Text field for the parameter.


cleanISPerctext

private org.eclipse.swt.widgets.Text cleanISPerctext
Text field for the parameter.


cleanProPerctext

private org.eclipse.swt.widgets.Text cleanProPerctext
Text field for the parameter.


dupPerctext

private org.eclipse.swt.widgets.Text dupPerctext
Text field for the parameter.


orthPerctext

private org.eclipse.swt.widgets.Text orthPerctext
Text field for the parameter.


cleanMinLentext

private org.eclipse.swt.widgets.Text cleanMinLentext
Text field for the parameter.


sep1

private org.eclipse.swt.widgets.Label sep1
Seperator.


gapExtractLengthlabel

private org.eclipse.swt.widgets.Label gapExtractLengthlabel
Parameter label.


gapJoinLengthlabel

private org.eclipse.swt.widgets.Label gapJoinLengthlabel
Parameter label.


stitchDifferencelabel

private org.eclipse.swt.widgets.Label stitchDifferencelabel
Parameter label.


stitchMinLengthlabel

private org.eclipse.swt.widgets.Label stitchMinLengthlabel
Parameter label.


stitchDistancelabel

private org.eclipse.swt.widgets.Label stitchDistancelabel
Parameter label.


evallabel

private org.eclipse.swt.widgets.Label evallabel
Parameter label.


cleanISPerclabel

private org.eclipse.swt.widgets.Label cleanISPerclabel
Parameter label.


cleanProPerclabel

private org.eclipse.swt.widgets.Label cleanProPerclabel
Parameter label.


dupPerclabel

private org.eclipse.swt.widgets.Label dupPerclabel
Parameter label.


orthPerclabel

private org.eclipse.swt.widgets.Label orthPerclabel
Parameter label.


cleanMinLenlabel

private org.eclipse.swt.widgets.Label cleanMinLenlabel
Parameter label.


bp1Label

private org.eclipse.swt.widgets.Label bp1Label
"bp" label.


bp2Label

private org.eclipse.swt.widgets.Label bp2Label
"bp" label.


bp3Label

private org.eclipse.swt.widgets.Label bp3Label
"bp" label.


bp4Label

private org.eclipse.swt.widgets.Label bp4Label
"bp" label.


bp5Label

private org.eclipse.swt.widgets.Label bp5Label
"bp" label.


Per1Label

private org.eclipse.swt.widgets.Label Per1Label
"%" label.


Per2Label

private org.eclipse.swt.widgets.Label Per2Label
"%" label.


MainTF

private org.eclipse.swt.custom.CTabFolder MainTF
Magic main tab folder.


MainTI

private org.eclipse.swt.custom.CTabItem MainTI
Magic main tab item.


tabFolder1

private org.eclipse.swt.widgets.TabFolder tabFolder1
Parameters tab folder.


item1

private org.eclipse.swt.widgets.TabItem item1
Preprocessing parametrs tab item.


item2

private org.eclipse.swt.widgets.TabItem item2
mapping parametrs tab item.


paratab

private org.eclipse.swt.widgets.Composite paratab
Parameters tab item control.


group1

private org.eclipse.swt.widgets.Group group1
Parameters group: includes texts/labels.


group2

private org.eclipse.swt.widgets.Group group2
Parameters group: includes texts/labels.


group3

private org.eclipse.swt.widgets.Group group3
Parameters group: includes texts/labels.


group4

private org.eclipse.swt.widgets.Group group4
Parameters group: includes texts/labels.


group5

private org.eclipse.swt.widgets.Group group5
Parameters group: includes texts/labels.


group6

private org.eclipse.swt.widgets.Group group6
Parameters group: includes texts/labels.


OKButton

private org.eclipse.swt.widgets.Button OKButton
A button.


RestoreDefaultButton1

private org.eclipse.swt.widgets.Button RestoreDefaultButton1
A button.


RestoreDefaultButton2

private org.eclipse.swt.widgets.Button RestoreDefaultButton2
A button.


OKButton2

private org.eclipse.swt.widgets.Button OKButton2
A button.


UgapExtractLength

private long UgapExtractLength
Parameters set by the user.


UgapJoinLength

private long UgapJoinLength
Parameters set by the user.


UstitchDifference

private long UstitchDifference
Parameters set by the user.


UstitchMinLength

private long UstitchMinLength
Parameters set by the user.


UstitchDistance

private long UstitchDistance
Parameters set by the user.


Ueval

private double Ueval
Parameters set by the user.


UcleanISPerc

private double UcleanISPerc
Parameters set by the user.


UcleanProPerc

private double UcleanProPerc
Parameters set by the user.


UcleanMinLen

private double UcleanMinLen
Parameters set by the user.


dupPerc

private double dupPerc
Parameters set by the user.


UdupPerc

private double UdupPerc
Parameters set by the user.


orthPerc

private double orthPerc
Parameters set by the user.


UorthPerc

private double UorthPerc
Parameters set by the user.


controller_

private IDataHandler controller_
Magic controller.

Constructor Detail

ParametersFrame

public ParametersFrame(org.eclipse.swt.custom.CTabFolder tabF,
                       org.eclipse.swt.custom.CTabItem tabI,
                       org.eclipse.swt.widgets.Shell shell,
                       IDataHandler cont)
C'tor, initiates parameters tab with the default groups/texts/labels and contructs the buttons.

Parameters:
tabF - CTabFolder: Magic main tab folder.
tabI - CTabItem: Magic main tab item.
shell - Shell: DataView shell.
cont - IDataHandler: magic controller.
Method Detail

setUserParameters

protected void setUserParameters()
Sets parameters entered by the user to default, also stores data in the "Magic.ini" file. A user though can restore Magic constant parameters.


setPreProccesingDefaultVals

private void setPreProccesingDefaultVals()
Restores Magic contant preprocessing parameters.


setMappingDefaultVals

private void setMappingDefaultVals()
Restores Magic contant mapping parameters.


show

public void show(org.eclipse.swt.custom.CTabItem paraitem)
Sets parameters tabitem to be paraitem, and its control paratab.

Parameters:
paraitem - CTabItem: given tab item.

setParametersINI

public void setParametersINI(java.lang.String OutputIni,
                             java.lang.String inputDir,
                             java.lang.String outputDir,
                             java.lang.String Lang)
Write user parameters into Magic.ini file.

Parameters:
OutputIni - String:file name.
inputDir - String: magic input location.
outputDir - String: magic output location.
Lang - String: index of the chosen language.

getParametersFromINI

public void getParametersFromINI(Magic magic)
Extract default parameters from Magic data structure.

Parameters:
magic - Magic: Data structure.