From 8e6dbe1f0052ed274fbd0a9b2455575e2a3bfa03 Mon Sep 17 00:00:00 2001 From: preecej Date: Tue, 15 May 2012 21:36:26 +0000 Subject: [PATCH] in progress: term details web service call svn path=/; revision=328 --- .../dcu/apps/ist/views/SegmentationView.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index 68bfe3c..ff81779 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -248,10 +248,10 @@ public class SegmentationView extends Composite { }); comboLabel.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - selectDropdownLabel(e); + selectDropdownLabel(e, comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1)); } }); - assign = SwtUtils.addButton(termLookupBar, 50, "Assign"); + assign = SwtUtils.addButton(termLookupBar, 55, "Assign"); assign.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { if(view.getContext().isEnabled()) @@ -311,13 +311,19 @@ public class SegmentationView extends Composite { 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) { - termDetailLookup(); + 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() { + 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)) termDetailTable.setEnabled(true); } -- 2.34.1