view
Class OptionDialog

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

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

Title: Bioinformatics Project

Description: Genomes Comparacent

Copyright: Copyright (c) 2005-2006

OptionDialog is a class the views Magic options in a dialog window, it is NOT used to store Magic optional settings, its rather used to view it and enable changing them.

Version:
1.0
Author:
Shadi Ibrahem.

Field Summary
private  org.eclipse.swt.widgets.Combo combo
          A combo box for language.
protected  IDataHandler controller_
          Magic controller.
protected  java.lang.String input
          input directory, used in case user changes the input directory.
private  org.eclipse.swt.widgets.TabItem IOitem
          Input/Output tab item.
private  org.eclipse.swt.widgets.Composite IOtab
          Input/Output tab item control.
private  boolean isCancelButton
          True if the operation has been canceled that way, no changes in the data base is needed.
private  int LangIndex
          The language index: 0 : English.
private  org.eclipse.swt.widgets.TabItem Langitem
          Language tab item.
private  org.eclipse.swt.widgets.Composite Langtab
          Language tab item control.
private  org.eclipse.swt.widgets.TabFolder MainTab
          OptionDialog tab folder.
private  java.util.ResourceBundle message
          Internationalization.
protected  java.lang.String Output
          Output directory, used in case user changes the output directory.
private  org.eclipse.swt.widgets.Shell parent
          DataView shell, in order to take control of the view.
private  org.eclipse.swt.widgets.Shell shell
          OptionDialog shell, in order to view data in a seperate window.
private  org.eclipse.swt.widgets.Text text1
          Text filed for the input directory.
private  org.eclipse.swt.widgets.Text text2
          Text filed for the output directory.
 
Constructor Summary
OptionDialog(org.eclipse.swt.widgets.Shell par, IDataHandler controller)
          C'tor, builds the option dialog view, constructs the tabs and sub components.
 
Method Summary
 java.lang.String getInputDirectory()
          Returns the input directory as updated by the user.
 java.lang.String getOutputDirectory()
          Returns the output directory as updated by the user.
 boolean isOperationCanceled()
          Indicates wether the operation has been canceled or not.
 void open()
          Views the option dialog window, and initiates the tabs with the appropriate text.
 
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

controller_

protected IDataHandler controller_
Magic controller.


shell

private org.eclipse.swt.widgets.Shell shell
OptionDialog shell, in order to view data in a seperate window.


parent

private org.eclipse.swt.widgets.Shell parent
DataView shell, in order to take control of the view.


input

protected java.lang.String input
input directory, used in case user changes the input directory.


Output

protected java.lang.String Output
Output directory, used in case user changes the output directory.


isCancelButton

private boolean isCancelButton
True if the operation has been canceled that way, no changes in the data base is needed.


text1

private org.eclipse.swt.widgets.Text text1
Text filed for the input directory.


text2

private org.eclipse.swt.widgets.Text text2
Text filed for the output directory.


MainTab

private org.eclipse.swt.widgets.TabFolder MainTab
OptionDialog tab folder.


IOitem

private org.eclipse.swt.widgets.TabItem IOitem
Input/Output tab item.


IOtab

private org.eclipse.swt.widgets.Composite IOtab
Input/Output tab item control.


Langitem

private org.eclipse.swt.widgets.TabItem Langitem
Language tab item.


Langtab

private org.eclipse.swt.widgets.Composite Langtab
Language tab item control.


combo

private org.eclipse.swt.widgets.Combo combo
A combo box for language.


LangIndex

private int LangIndex
The language index: 0 : English. 1 : Russian. 2 : Hebrew. 3 : Arabic.


message

private java.util.ResourceBundle message
Internationalization.

Constructor Detail

OptionDialog

public OptionDialog(org.eclipse.swt.widgets.Shell par,
                    IDataHandler controller)
C'tor, builds the option dialog view, constructs the tabs and sub components.

Parameters:
par - Shell: Dataview shell.
controller - IDataHandler: Magic controller.
Method Detail

open

public void open()
Views the option dialog window, and initiates the tabs with the appropriate text.


isOperationCanceled

public boolean isOperationCanceled()
Indicates wether the operation has been canceled or not.

Returns:
True if the operation has been canceled

getInputDirectory

public java.lang.String getInputDirectory()
Returns the input directory as updated by the user. note: legal path for directory validation has been done.

Returns:
String: directory path.

getOutputDirectory

public java.lang.String getOutputDirectory()
Returns the output directory as updated by the user. note: legal path for directory validation has been done.

Returns:
String: directory path.