Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Right panel modifications. Done by Nikhil.
authorlingutln <lingutln@localhost>
Tue, 31 Jan 2012 21:56:32 +0000 (21:56 +0000)
committerlingutln <lingutln@localhost>
Tue, 31 Jan 2012 21:56:32 +0000 (21:56 +0000)
svn path=/; revision=289

Annotation/resources/config/application.properties
Annotation/resources/config/view.properties
Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java
Annotation/src/ie/dcu/swt/SwtUtils.java

index 31a723fa99a954642f26a6fddabde8b734c112cd..3b458e819ff4a0d9175380b22088246767cefb5b 100644 (file)
@@ -28,4 +28,7 @@ ExperimentPanel.button.text.finish=Finish
 
 # Web Service Configuration
 POWebService.TermSearch.URL=http://palea.cgrb.oregonstate.edu/services/PO_web_service.php?request_type=term_search&search_value=<search_term>&inc_synonyms&branch_filter=plant_anatomy&max=20
-POWebService.TermDetail.URL=http://palea.cgrb.oregonstate.edu/services/PO_web_service.php?request_type=term_detail&accession_id=<acc_id>
\ No newline at end of file
+POWebService.TermDetail.URL=http://palea.cgrb.oregonstate.edu/services/PO_web_service.php?request_type=term_detail&accession_id=<acc_id>
+
+#Curators names
+CuratorNamesList=Nikhil,Justin,Pankaj,Lol Cooper,Rajani
\ No newline at end of file
index 38e43a0d5602c30d8a37cb80d323abba604b705d..be5f897a21888b3158741d1827200490d0606a1e 100644 (file)
@@ -52,4 +52,7 @@ SegmentationView.Action.SegmenterOptions.image=file:resources/icons/preferences.
 SegmentationView.Action.SetLabel.text=Annotate :
 SegmentationView.Action.SetLabel.tooltip=Annotate the segmented piece.
 SegmentationView.Action.SetLabel.image=
+SegmentationView.Action.SetCurator.text=Curator Name :
+SegmentationView.Action.SetCurator.tooltip=Select the name of the curator.
+SegmentationView.Action.SetCurator.image=
 
index 209f5382be5493cd5cbe80a266c006025ea9f433..c77c58e0e11c99623ae15d88f209a68141009ac2 100644 (file)
@@ -1,6 +1,7 @@
 package ie.dcu.apps.ist.views;
 
 
+import ie.dcu.apps.ist.AppWindow;
 import ie.dcu.apps.ist.PainterRegistry;
 import ie.dcu.apps.ist.event.*;
 import ie.dcu.apps.ist.widgets.*;
@@ -41,18 +42,19 @@ public class SegmentationView extends Composite {
        // Houses various painters
        private final PainterRegistry painters;
        
-       
        // View handling annotations (image pane)
        private final AnnotatedImageControl view;
        
        // tool bars
        private final ToolBar mainToolbar, viewSelectionToolbar, termLookupBar;
        
+       private ToolBar termDetailToolbar;
+       
        // Composite for Term details
        private Composite termDetailComposite;
        
        // term detail table
-       private final Table termDetailTable;
+       private Table termDetailTable;
        
        // Control to change brush size
        private final BrushControl brushControl;
@@ -74,7 +76,7 @@ public class SegmentationView extends Composite {
        // Combo box housing the selectable views
        private Combo combo;
 
-       public static Combo comboLabel;
+       public static Combo comboLabel,curatorCombo;
        
        private static Button assign;
        
@@ -112,6 +114,7 @@ public class SegmentationView extends Composite {
                SetPainter,
                SetLabel,
                AssignButton,
+               SetCurator,
                SegmenterOptions;
                
                private ToolAction action;
@@ -131,12 +134,11 @@ public class SegmentationView extends Composite {
                this.props = props;
                
                painters = new PainterRegistry();
-               
                mainToolbar = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
                viewSelectionToolbar = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
                termLookupBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
                view = new AnnotatedImageControl(this, SWT.BORDER);
-               termDetailTable = new Table(this, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
+               termDetailComposite = new Composite(this, SWT.BORDER | SWT.RIGHT | SWT.FLAT);
                
                brushControl = new BrushControl(getShell(), SWT.BORDER);
                eventHandler = new EventHandler();
@@ -157,6 +159,7 @@ public class SegmentationView extends Composite {
                createToolViewSelectionToolbar();
                createToolTermLookupBar();
                createTermDetailTable();
+               createTermDetailFields();
                
                // lay out the controls
                layoutControls();
@@ -298,16 +301,17 @@ public class SegmentationView extends Composite {
         * Set initial properties of the Term Detail right pane
         */
        private void createTermDetailTable() {
+               termDetailTable = new Table(termDetailComposite, SWT.BORDER | SWT.FULL_SELECTION);
                termDetailTable.setLinesVisible (true);
                termDetailTable.setHeaderVisible (true);
                
                GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
-               data.heightHint = 200;
+               //data.heightHint = 200;
 
                termDetailTable.setLayoutData(data);
                String[] titles = {"Label","Data"};
                for (int i=0; i<titles.length; i++) {
-                       TableColumn column = new TableColumn (termDetailTable, SWT.NONE);
+                       TableColumn column = new TableColumn (termDetailTable, SWT.BORDER_SOLID);
                        column.setText (titles [i]);
                }
 
@@ -324,6 +328,22 @@ public class SegmentationView extends Composite {
                termDetailTable.setEnabled(false);
        }
        
+       private void createTermDetailFields() {
+               termDetailToolbar = new ToolBar(termDetailComposite, SWT.RIGHT | SWT.FLAT); 
+               SwtUtils.addLabel(termDetailToolbar, getAction(Tool.SetCurator).getText());
+               curatorCombo = SwtUtils.addCombo(termDetailToolbar, 175, SWT.READ_ONLY);
+               curatorCombo.setToolTipText( getAction(Tool.SetPainter).getToolTipText());
+               curatorCombo.addSelectionListener(new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent e) {
+                               execute(Tool.SetPainter, null);
+                       }
+               });
+               String[] curatorsList = AppWindow.props.getProperty("CuratorNamesList").split(",");
+               for(String curator : curatorsList)
+                       curatorCombo.add(curator);
+               termDetailToolbar.pack();
+       }
+       
        private void layoutControls() {
                GridLayout layout = new GridLayout(3, false);
                layout.marginHeight = 1;
@@ -370,14 +390,32 @@ public class SegmentationView extends Composite {
                gd.verticalSpan = 1;
                termLookupBar.setLayoutData(gd);
                
-               // Layout term detail table
+               // Inner composite properties
                gd = new GridData();
                gd.horizontalAlignment = SWT.FILL;
                gd.verticalAlignment = GridData.BEGINNING;
                gd.verticalIndent = 1;
                gd.verticalSpan = 1;
+               termDetailComposite.setLayoutData(gd);
+               
+               // Layout term detail Composite
+               GridLayout termDetailLayout = new GridLayout(1, true);
+               termDetailComposite.setLayout(termDetailLayout);
+               
+               // Layout term detail table                             
+               gd = new GridData(SWT.FILL,SWT.FILL,true,true);
+               gd.grabExcessHorizontalSpace = true;
+               gd.grabExcessVerticalSpace = true;
                termDetailTable.setLayoutData(gd);
-       
+               
+               // Layout term lookup toolbar within ineer composite
+               gd = new GridData();
+               gd.horizontalAlignment = SWT.FILL;
+               gd.verticalAlignment = GridData.BEGINNING;
+               gd.verticalIndent = 1;
+               gd.verticalSpan = 1;
+               termDetailToolbar.setLayoutData(gd);
+               
        }
        
        
index d9fe8ff5af3ae41bede16df5b10a887239e3a938..84fe86481216aff289111297a6af6e6c85a586a0 100644 (file)
@@ -3,6 +3,7 @@ package ie.dcu.swt;
 import ie.dcu.swt.event.*;
 import ie.dcu.util.FileUtils;
 
+import java.awt.TextArea;
 import java.io.*;
 
 import org.eclipse.swt.*;