Revision 6829d79d
Added by Ben Stöver over 9 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/molecular/AlignmentEditor.java | ||
---|---|---|
28 | 28 |
import org.biojava.bio.chromatogram.ChromatogramFactory; |
29 | 29 |
import org.biojava3.core.sequence.DNASequence; |
30 | 30 |
import org.biojava3.core.sequence.compound.NucleotideCompound; |
31 |
import org.eclipse.core.resources.ResourcesPlugin; |
|
32 |
import org.eclipse.core.runtime.IConfigurationElement; |
|
33 | 31 |
import org.eclipse.core.runtime.IProgressMonitor; |
34 | 32 |
import org.eclipse.swt.SWT; |
35 | 33 |
import org.eclipse.swt.widgets.Composite; |
... | ... | |
85 | 83 |
alignment); |
86 | 84 |
|
87 | 85 |
AlignmentArea result = new AlignmentArea(); |
88 |
result.setSequenceProvider(sequenceProvider, false); |
|
89 |
SequenceIndexArea sequenceIndexArea = new SequenceIndexArea(result); |
|
86 |
result.getContentArea().setSequenceProvider(sequenceProvider, false);
|
|
87 |
SequenceIndexArea sequenceIndexArea = new SequenceIndexArea(result.getContentArea());
|
|
90 | 88 |
//sequenceIndexArea.setFirstIndex(5); |
91 | 89 |
//sequenceIndexArea.setHeight(25); |
92 |
result.getDataAreas().getTopAreas().add(sequenceIndexArea); |
|
90 |
result.getContentArea().getDataAreas().getTopAreas().add(sequenceIndexArea);
|
|
93 | 91 |
|
94 | 92 |
// PherogramArea pherogramArea = new PherogramArea(result, pherogramProvider); |
95 | 93 |
// pherogramArea.setFirstSeqPos(34 + 5); |
... | ... | |
101 | 99 |
|
102 | 100 |
PherogramProvider pherogramProvider = new BioJavaPherogramProvider(ChromatogramFactory.create( |
103 | 101 |
new File("D:\\Users\\BenStoever\\Documents\\Studium\\Projekte\\Promotion\\EDITor\\Quelltexte\\LibrAlign branch\\Repository\\eu.etaxonomy.taxeditor.editor\\src\\main\\resources\\AlignmentTestData\\JR430_JR-P01.ab1"))); |
104 |
PherogramArea pherogramArea = new PherogramArea(result, pherogramProvider); |
|
102 |
PherogramArea pherogramArea = new PherogramArea(result.getContentArea(), pherogramProvider);
|
|
105 | 103 |
pherogramArea.setFirstSeqPos(1); |
106 | 104 |
pherogramArea.setLeftCutPosition(13); |
107 | 105 |
pherogramArea.setRightCutPosition(697); |
108 | 106 |
pherogramArea.getAlignmentModel().setShiftChange(14, 1); |
109 | 107 |
pherogramArea.getAlignmentModel().setShiftChange(35, 1); |
110 |
result.getDataAreas().getSequenceAreas(sequenceProvider.sequenceIDByName("Read 1")).add(pherogramArea); |
|
108 |
result.getContentArea().getDataAreas().getSequenceAreas(sequenceProvider.sequenceIDByName("Read 1")).add(pherogramArea);
|
|
111 | 109 |
|
112 | 110 |
pherogramProvider = new ReverseComplementPherogramProvider(new BioJavaPherogramProvider(ChromatogramFactory.create( |
113 | 111 |
new File("D:\\Users\\BenStoever\\Documents\\Studium\\Projekte\\Promotion\\EDITor\\Quelltexte\\LibrAlign branch\\Repository\\eu.etaxonomy.taxeditor.editor\\src\\main\\resources\\AlignmentTestData\\JR444_JR-P05.ab1")))); |
114 |
pherogramArea = new PherogramArea(result, pherogramProvider); |
|
112 |
pherogramArea = new PherogramArea(result.getContentArea(), pherogramProvider);
|
|
115 | 113 |
pherogramArea.setFirstSeqPos(1); |
116 | 114 |
pherogramArea.setLeftCutPosition(267); |
117 | 115 |
pherogramArea.getAlignmentModel().setShiftChange(273, -1); |
118 | 116 |
pherogramArea.setVerticalScale(20 * pherogramArea.getVerticalScale()); |
119 |
result.getDataAreas().getSequenceAreas(sequenceProvider.sequenceIDByName("Read 2")).add(pherogramArea); |
|
117 |
result.getContentArea().getDataAreas().getSequenceAreas(sequenceProvider.sequenceIDByName("Read 2")).add(pherogramArea);
|
|
120 | 118 |
|
121 | 119 |
|
122 |
result.getDataAreas().getBottomAreas().add(new ConsensusSequenceArea(result));
|
|
120 |
result.getContentArea().getDataAreas().getBottomAreas().add(new ConsensusSequenceArea(result.getContentArea()));
|
|
123 | 121 |
return result; |
124 | 122 |
} |
125 | 123 |
catch (Exception e) { |
... | ... | |
156 | 154 |
public void createPartControl(Composite parent) { |
157 | 155 |
alignmentArea = createAlignmentArea(); |
158 | 156 |
Composite alignmentWidget = alignmentArea.createSWTWidget(parent, SWT.NONE); |
157 |
//getSite().setSelectionProvider(provider) |
|
159 | 158 |
} |
160 | 159 |
|
161 | 160 |
|
... | ... | |
214 | 213 |
*/ |
215 | 214 |
@Override |
216 | 215 |
public void setFocus() { |
217 |
alignmentArea.getToolkitComponent().redistributeHeight(); |
|
216 |
//alignmentArea.getToolkitComponent().redistributeHeight();
|
|
218 | 217 |
} |
219 | 218 |
} |
Also available in: Unified diff
AlignmentEditor adjusted to recent changes in LibrAlign.