view
Class AddGenome

java.lang.Object
  extended by org.eclipse.swt.widgets.Dialog
      extended by view.AddGenome

public class AddGenome
extends org.eclipse.swt.widgets.Dialog

Title: Bioinformatics Project

Description: Genomes Comparacent

Copyright: Copyright (c) 2005-2006

AddGenome class handles a dialog for adding a new genome, it builds, validate the form,and validates the entered details

Version:
1.0
Author:
Shadi Ibrahem.

Field Summary
private  org.eclipse.swt.widgets.Text AnchorFileText
          Text field for the anchor file path.
private  org.eclipse.swt.widgets.Button BBrowse1
          Browse button.
private  org.eclipse.swt.widgets.Button BBrowse2
          Browse button.
private  org.eclipse.swt.widgets.Button BBrowse3
          Browse button.
private  org.eclipse.swt.widgets.Button BBrowse4
          Browse button.
private  org.eclipse.swt.widgets.Button BBrowse5
          Browse button.
private  org.eclipse.swt.events.SelectionListener BrwoseListener
          A listner for the "browse" buttons.
private  org.eclipse.swt.widgets.Button Circular
          Check box.
protected  IDataHandler controller_
          The controller of magic.
protected  org.eclipse.swt.widgets.FileDialog fileDialog
          An object used to open file path dialog.
private  org.eclipse.swt.widgets.Group gCompDetails
          Group holding the required detail fields to add a new genome.
private  org.eclipse.swt.widgets.Text GenFileText
          Text field for the genome file path.
private  org.eclipse.swt.widgets.Text GLengText
          Text field for the length file path.
private  org.eclipse.swt.widgets.Text GnameText
          Text field for the genome full name.
private  org.eclipse.swt.widgets.Group gOptionDetails
          Group hodling an optional information fields about the genome.
private  org.eclipse.swt.widgets.Text GSnameText
          Text field for the genome short name.
private  org.eclipse.swt.widgets.Text GTEfileText
          Text field for the te file path.
private  org.eclipse.swt.widgets.Text GVEfileText
          Text field for the ve file path.
private  org.eclipse.swt.widgets.Text GVirusfileText
          Text field for the virus file path.
private static boolean isCancelButton
          Indicates wether the adding operation is canceled or confirmed.
private  java.util.ResourceBundle message
          Internationalization.
private  org.eclipse.swt.widgets.Shell parent
          The main display from Data view.
private  org.eclipse.swt.widgets.Shell shell
          The add new genome shell.
 
Constructor Summary
AddGenome(org.eclipse.swt.widgets.Shell par, IDataHandler controller)
          C'tor, creates the "add new genome" form.
 
Method Summary
protected  void copyValues()
          Copies the the files entered by the user to the input directory.
 boolean isOperationCanceled()
          Returns true if the user has canceld the adding operation.
 void open()
          Shows the "add new genome" form, set objects bounderies,text and tooltips.
protected  boolean validateFields()
          Validates informations entered into the fields by the user, show an apropriate error message in case of correction needed.
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isCancelButton

private static boolean isCancelButton
Indicates wether the adding operation is canceled or confirmed.


controller_

protected IDataHandler controller_
The controller of magic.


fileDialog

protected org.eclipse.swt.widgets.FileDialog fileDialog
An object used to open file path dialog.


shell

private org.eclipse.swt.widgets.Shell shell
The add new genome shell.


parent

private org.eclipse.swt.widgets.Shell parent
The main display from Data view.


BrwoseListener

private org.eclipse.swt.events.SelectionListener BrwoseListener
A listner for the "browse" buttons.


GenFileText

private org.eclipse.swt.widgets.Text GenFileText
Text field for the genome file path.


BBrowse1

private org.eclipse.swt.widgets.Button BBrowse1
Browse button.


BBrowse2

private org.eclipse.swt.widgets.Button BBrowse2
Browse button.


BBrowse4

private org.eclipse.swt.widgets.Button BBrowse4
Browse button.


BBrowse3

private org.eclipse.swt.widgets.Button BBrowse3
Browse button.


BBrowse5

private org.eclipse.swt.widgets.Button BBrowse5
Browse button.


AnchorFileText

private org.eclipse.swt.widgets.Text AnchorFileText
Text field for the anchor file path.


GTEfileText

private org.eclipse.swt.widgets.Text GTEfileText
Text field for the te file path.


GVEfileText

private org.eclipse.swt.widgets.Text GVEfileText
Text field for the ve file path.


GVirusfileText

private org.eclipse.swt.widgets.Text GVirusfileText
Text field for the virus file path.


GLengText

private org.eclipse.swt.widgets.Text GLengText
Text field for the length file path.


GnameText

private org.eclipse.swt.widgets.Text GnameText
Text field for the genome full name.


GSnameText

private org.eclipse.swt.widgets.Text GSnameText
Text field for the genome short name.


gCompDetails

private org.eclipse.swt.widgets.Group gCompDetails
Group holding the required detail fields to add a new genome.


gOptionDetails

private org.eclipse.swt.widgets.Group gOptionDetails
Group hodling an optional information fields about the genome.


Circular

private org.eclipse.swt.widgets.Button Circular
Check box.


message

private java.util.ResourceBundle message
Internationalization.

Constructor Detail

AddGenome

public AddGenome(org.eclipse.swt.widgets.Shell par,
                 IDataHandler controller)
C'tor, creates the "add new genome" form.

Parameters:
par - Shell: the parent shell from the data view.
controller - IDataHandler: the controller of Magic.
Method Detail

open

public void open()
Shows the "add new genome" form, set objects bounderies,text and tooltips.


copyValues

protected void copyValues()
Copies the the files entered by the user to the input directory. Creates a prop file also, note: some values still undetermined (with value -1).


validateFields

protected boolean validateFields()
Validates informations entered into the fields by the user, show an apropriate error message in case of correction needed.

Returns:
true if the information is correct.

isOperationCanceled

public boolean isOperationCanceled()
Returns true if the user has canceld the adding operation.

Returns:
true if the user has canceld the adding operation.