<classpathentry kind="src" path="src"/>
<classpathentry excluding="src/" kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="lib" path="/home/lingutln/workspace/Annotation/library/commons-lang3-3.1.jar"/>
- <classpathentry kind="lib" path="/home/lingutln/workspace/Annotation/library/jface.jar"/>
- <classpathentry kind="lib" path="/home/lingutln/workspace/Annotation/library/json.jar"/>
- <classpathentry kind="lib" path="/home/lingutln/workspace/Annotation/library/swt-gtk-64.jar"/>
+ <classpathentry kind="lib" path="/home/preecej/Development/eclipse_workspace/Annotation/library/commons-lang3-3.1.jar"/>
+ <classpathentry kind="lib" path="/home/preecej/Development/eclipse_workspace/Annotation/library/jface.jar"/>
+ <classpathentry kind="lib" path="/home/preecej/Development/eclipse_workspace/Annotation/library/json.jar"/>
+ <classpathentry kind="lib" path="/home/preecej/Development/eclipse_workspace/Annotation/library/swt-gtk-64.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
private Composite termDetailComposite;
// term detail table
- private Table termDetailTable;
+ private static Table termDetailTable;
// Control to change brush size
private final BrushControl brushControl;
viewSelectionToolbar.pack();
}
+ private String parseAccessionIdFromComboLabel(Combo comboLabel) {
+ return comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1);
+ }
+
/**
* Third tool bar for holding the Annotate Combo box.
*/
});
comboLabel.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- selectDropdownLabel(e, comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1));
+ termDetailLookup(parseAccessionIdFromComboLabel(comboLabel));
}
});
assign = SwtUtils.addButton(termLookupBar, 55, "Assign");
public void widgetSelected(SelectionEvent arg0) {
if(view.getContext().isEnabled())
{
+ OntologyTerm term = new OntologyTerm();
+ term.setName((String)comboLabel.getData(comboLabel.getText()));
+ term.setAccessionId(parseAccessionIdFromComboLabel(comboLabel));
+ view.getContext().getEnabledMask().ontologyTerm = term;
+ /* TODO: remove this and reference SegementationMake.ontologyTerm.getName() instead
+ * (find tooltip and any other reference as well)
+ */
view.getContext().getEnabledMask().segmentName = (String) comboLabel.getData(comboLabel.getText());
}
execute(Tool.AssignButton, null);
searchSpecies.setEnabled(!(speciesCombo.getText().isEmpty()));
speciesCombo.setListVisible(true);
}
-
- // TODO: you need to find the event hook for segment selection, that resets the comboLabel and the .accessionId (you should use accessionId in this context)
- public void selectSegment(SelectionEvent e) {
- System.out.println("curr accession id (from segment): " + this.view.getContext().getEnabledMask().accessionId);
- termDetailLookup(this.view.getContext().getEnabledMask().accessionId);
- }
-
- public void selectDropdownLabel(SelectionEvent e, String accessionId) {
- System.out.println("curr accession id (from label): " + accessionId);
- //System.out.println("curr comboLabel value: " + comboLabel.getText());
- termDetailLookup(accessionId);
- }
-
- private void termDetailLookup(String accessionId) {
- // call term detail web service method using accession id (from 1) segment obj or 2) label selection (before assign button is clicked))
+
+ /*
+ * call term detail web service method using accession id from 1) segment obj or 2) label selection
+ * (before assign button is clicked)
+ */
+ public static void termDetailLookup(String accessionId) {
+ System.out.println("curr accession id (from segment or label): " + accessionId);
termDetailTable.setEnabled(true);
}
import ie.dcu.matrix.ByteMatrix;
import ie.dcu.segment.annotate.AnnotationManager;
+import ie.dcu.apps.ist.labelling.OntologyTerm;
import java.io.*;
//The layering number of the segmentation mask.
public int layerNumber;
- //The name(label) associated with each segment.
+ @Deprecated
+ //The name(label) associated with each segment. - replaced with Term object
public String segmentName;
- // accession id associated with the segmentName
+ @Deprecated
+ // accession id associated with the segmentName - replaced with Term object
public String accessionId;
+ // holds the accessionId and name of the ontology term associated with this segment
+ public OntologyTerm ontologyTerm;
+
//The maskImage each segment.
public Image maskImage;