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 info.bioinfweb.libralign.pherogram.PherogramFormats.QualityOutputType;
|
18
|
import info.bioinfweb.libralign.pherogram.model.PherogramComponentModel;
|
19
|
import info.bioinfweb.libralign.pherogram.view.PherogramView;
|
20
|
import info.bioinfweb.tic.SWTComponentFactory;
|
21
|
|
22
|
|
23
|
|
24
|
/**
|
25
|
* Component that allows to view a pherogram without the distortion due to aligning it to a sequence as in
|
26
|
* {@link AlignmentEditorE4}.
|
27
|
*
|
28
|
* @author Ben Stöver
|
29
|
* @date Nov 20, 2014
|
30
|
*/
|
31
|
public class PherogramPartE4 {
|
32
|
public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView"; //$NON-NLS-1$
|
33
|
|
34
|
private PherogramView pherogramView = null;
|
35
|
|
36
|
public PherogramView getPherogramView() {
|
37
|
if (pherogramView == null) {
|
38
|
pherogramView = new PherogramView();
|
39
|
pherogramView.getTraceCurveView().getFormats().setShowProbabilityValues(true);
|
40
|
pherogramView.getTraceCurveView().setHorizontalScale(1);
|
41
|
pherogramView.getTraceCurveView().setVerticalScale(100);
|
42
|
pherogramView.getTraceCurveView().getFormats().setQualityOutputType(QualityOutputType.NONE); //TODO Make this user defined
|
43
|
pherogramView.getTraceCurveView().getFormats().setShowProbabilityValues(false);
|
44
|
}
|
45
|
return pherogramView;
|
46
|
}
|
47
|
|
48
|
|
49
|
@PostConstruct
|
50
|
public void createPartControl(Composite parent) {
|
51
|
SWTComponentFactory.getInstance().getSWTComponent(getPherogramView(), parent, SWT.NONE);
|
52
|
getPherogramView().assignSize();
|
53
|
}
|
54
|
|
55
|
public void init(PherogramComponentModel model){
|
56
|
getPherogramView().getTraceCurveView().setModel(model);
|
57
|
getPherogramView().assignSize();
|
58
|
}
|
59
|
|
60
|
}
|