/*******************************************************************************
* Copyright (c) 2008 The Bioclipse Project and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Stefan Kuhn
*
******************************************************************************/
package net.bioclipse.nmrshiftdb.wizards;
import net.bioclipse.nmrshiftdb.util.Bc_nmrshiftdbConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
public class DownloadSpectraServerWizardPage extends ServerWizardPage {
Button[] radios;
public DownloadSpectraServerWizardPage() {
super();
}
public DownloadSpectraServerWizardPage(String nucleus) {
super(nucleus);
}
protected void addAdditionalControl (Composite container)
{
Label label=new Label(container, SWT.NULL);
label.setText("\n\rThis will search for structures and their spectra by your existing structure.\n\rPlease choose the type of search you would like to use:");
final String[] options = new String[] { "Exact Substructure", "Fuzzy Substructure","Identity" };
radios = new Button[options.length];
for (int i = 0; i < options.length; i++) {
radios[i] = new Button(container, SWT.RADIO);
if(i==2)
radios[i].setSelection(true);
radios[i].setText(options[i]);
}
}
public String selectedOption() //signifies type of search
{
if(radios[0].getSelection())
return Bc_nmrshiftdbConstants.SUBSTRUCTURE_EXACT;
else if(radios[1].getSelection())
return Bc_nmrshiftdbConstants.SUBSTRUCTURE_SIMILARITY;
else
return Bc_nmrshiftdbConstants.TOTALSTRUCTURE;
}
}