Project

General

Profile

Download (1.99 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.taxeditor.molecular.editor.e4;
10

    
11

    
12
import javax.annotation.PostConstruct;
13

    
14
import org.eclipse.swt.SWT;
15
import org.eclipse.swt.widgets.Composite;
16

    
17
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
18
import info.bioinfweb.libralign.pherogram.PherogramFormats.QualityOutputType;
19
import info.bioinfweb.libralign.pherogram.model.PherogramComponentModel;
20
import info.bioinfweb.libralign.pherogram.view.PherogramView;
21
import info.bioinfweb.tic.SWTComponentFactory;
22

    
23

    
24

    
25
/**
26
 * Component that allows to view a pherogram without the distortion due to aligning it to a sequence as in
27
 * {@link AlignmentEditor}.
28
 *
29
 * @author Ben Stöver
30
 * @date Nov 20, 2014
31
 */
32
public class PherogramPartE4 {
33
    public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView"; //$NON-NLS-1$
34

    
35
    private PherogramView pherogramView = null;
36

    
37
    public PherogramView getPherogramView() {
38
		if (pherogramView == null) {
39
			pherogramView = new PherogramView();
40
			pherogramView.getTraceCurveView().getFormats().setShowProbabilityValues(true);
41
			pherogramView.getTraceCurveView().setHorizontalScale(1);
42
			pherogramView.getTraceCurveView().setVerticalScale(100);
43
			pherogramView.getTraceCurveView().getFormats().setQualityOutputType(QualityOutputType.NONE);  //TODO Make this user defined
44
			pherogramView.getTraceCurveView().getFormats().setShowProbabilityValues(false);
45
		}
46
		return pherogramView;
47
	}
48

    
49

    
50
	@PostConstruct
51
	public void createPartControl(Composite parent) {
52
		SWTComponentFactory.getInstance().getSWTComponent(getPherogramView(), parent, SWT.NONE);
53
		getPherogramView().assignSize();
54
	}
55

    
56
	public void init(PherogramComponentModel model){
57
	    getPherogramView().getTraceCurveView().setModel(model);
58
	    getPherogramView().assignSize();
59
	}
60

    
61
}
(2-2/2)