From: lingutln Date: Tue, 10 Apr 2012 20:49:54 +0000 (+0000) Subject: Resolved refactoring of segment label. Done by Nikhil. X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=8a1a0a5ff0bf4bd0cd2a9225edce8ed8e238b6a1;p=old-jaiswallab-svn%2F.git Resolved refactoring of segment label. Done by Nikhil. svn path=/; revision=319 --- diff --git a/Annotation/src/ie/dcu/apps/ist/labelling/Labels.java b/Annotation/src/ie/dcu/apps/ist/labelling/Labels.java index f7d0c13..4a77f4c 100644 --- a/Annotation/src/ie/dcu/apps/ist/labelling/Labels.java +++ b/Annotation/src/ie/dcu/apps/ist/labelling/Labels.java @@ -109,7 +109,7 @@ public class Labels //get the employee element Element el = (Element)nlist.item(i); namBankId = new String(DatatypeConverter.parseBase64Binary(getTagValue("namebankID", el))); - nameBankString = new String(DatatypeConverter.parseBase64Binary(getTagValue("fullNameString", el))); + nameBankString = new String(DatatypeConverter.parseBase64Binary(getTagValue("nameString", el))); map.put(namBankId,nameBankString); } } diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index c003c74..68bfe3c 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -256,16 +256,8 @@ public class SegmentationView extends Composite { public void widgetSelected(SelectionEvent arg0) { if(view.getContext().isEnabled()) { - if(comboLabel.getText().indexOf('{') != -1) - { - view.getContext().getEnabledMask().segmentName = comboLabel.getText().substring(0,comboLabel.getText().indexOf('{')-1); - view.getContext().getEnabledMask().accessionId = comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1); - } - else - { - view.getContext().getEnabledMask().segmentName = comboLabel.getText(); - } - } + view.getContext().getEnabledMask().segmentName = (String) comboLabel.getData(comboLabel.getText()); + } execute(Tool.AssignButton, null); } }); @@ -297,6 +289,7 @@ public class SegmentationView extends Composite { { // set text for term label combo.add(term.getFormattedTerm(),i); + combo.setData(term.getFormattedTerm(), term.getName()); i++; } } @@ -314,7 +307,6 @@ public class SegmentationView extends Composite { { speciesCombo.add(species); } - System.out.println(speciesMap.size()); searchSpecies.setEnabled(!(speciesCombo.getText().isEmpty())); speciesCombo.setListVisible(true); } diff --git a/Annotation/src/ie/dcu/swt/SwtUtils.java b/Annotation/src/ie/dcu/swt/SwtUtils.java index 4599a9f..2e336f1 100644 --- a/Annotation/src/ie/dcu/swt/SwtUtils.java +++ b/Annotation/src/ie/dcu/swt/SwtUtils.java @@ -6,6 +6,7 @@ import ie.dcu.util.FileUtils; import java.io.*; +import org.eclipse.jface.viewers.ComboViewer; import org.eclipse.swt.*; import org.eclipse.swt.dnd.*; import org.eclipse.swt.graphics.*; @@ -663,7 +664,7 @@ public class SwtUtils { item.setControl(combo); return combo; } - + public static Combo addComboToComposite(Composite parent, int width, int style) { Composite box = new Composite(parent, SWT.NONE); box.setLayout(new GridLayout(SWT.FILL,false));