org.geneweaver.query.ui.WelcomePage Maven / Gradle / Ivy
package org.geneweaver.query.ui;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.geneweaver.query.dao.QueryBuildRequest;
class WelcomePage extends WizardPage {
private QueryBuildRequest request;
protected WelcomePage(QueryBuildRequest request, String pageName) {
super(pageName);
this.request = request;
setPageComplete(true);
setTitle("Welcome");
setMessage("Query Builder for Variant Orthology");
setImageDescriptor(ImageDescriptor.createFromURL(getClass().getClassLoader().getResource("GW2-logo-blue.png")));
}
@Override
public void createControl(Composite parent) {
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new GridLayout(1, false));
Label label = new Label(main, SWT.WRAP);
label.setText("This wizard is a tool to help input files with many variants or genes be run through the variant orthology graph. "
+ "It parses the input file, which will be a CSV, TSV or similar, builds a query which will generate a table of results when run with the graph.");
GridData dg = new GridData(SWT.FILL, SWT.CENTER, true, false);
dg.widthHint=200;
label.setLayoutData(dg);
ImageDescriptor des = ImageDescriptor.createFromURL(getClass().getClassLoader().getResource("PrototypeGraph.png"));
Image image = des.createImage();
label = new Label(main, SWT.NONE);
label.setImage(image);
label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
setControl(main);
}
}