Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Added some Modification to annotate box. Done by Nikhil.
authorlingutln <lingutln@localhost>
Thu, 17 Nov 2011 00:06:58 +0000 (00:06 +0000)
committerlingutln <lingutln@localhost>
Thu, 17 Nov 2011 00:06:58 +0000 (00:06 +0000)
svn path=/; revision=217

image_annotation/.classpath
image_annotation/src/ie/dcu/apps/ist/AppWindow.java
image_annotation/src/ie/dcu/apps/ist/views/SegmentationView.java

index 6a5ba76e2884cf6d38cf24d586b01f5232787d53..810f0b634a11c8ea16da45cd08e1b41b57320768 100644 (file)
@@ -3,7 +3,7 @@
        <classpathentry kind="lib" path="lib/swt-gtk-64.jar"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="plugins1"/>
-       <classpathentry kind="lib" path="lib/istapi-src.jar"/>
+       <classpathentry kind="lib" path="lib/istapi-src.jar" sourcepath="/home/lingutln/practice/istapi-src.jar"/>
        <classpathentry kind="lib" path="lib/istapi.jar"/>
        <classpathentry kind="lib" path="lib/jface.jar"/>
        <classpathentry kind="lib" path="resources/ant/lib/ant-deb.jar"/>
index a07bbb0a917a6a301c42136df072c286dbe212e7..5f32b244efc06446c9662a62361ab630d1cc4a88 100644 (file)
@@ -337,9 +337,6 @@ public class AppWindow extends ApplicationWindow implements FileDropListener {
                help.add(actions.get(HelpAction.class));
                help.add(actions.get(AboutAction.class));
                
-               MenuManager annotate = addMenu(bar, "&Annotate");
-               annotate.add(actions.get(HelpAction.class));
-               
                if (OsUtils.isMacOSX()) {
                        // Enhance the UI on the Mac
                        IAction aboutAction = actions.get(AboutAction.class);
index b5b52eed1b5edd88d6550af97046df712fa39a40..61077258525fb58d6b5645a024f7f4ad9486e371 100644 (file)
@@ -67,9 +67,6 @@ public class SegmentationView extends Composite {
        // Combo box housing the selectable views
        private Combo combo, comboLabel;
        
-       // Button for assigning a label to the Segmented image
-       private Button assign;
-       
        // Current segmentation tool
        private Segmenter segmenter;
        
@@ -188,7 +185,9 @@ public class SegmentationView extends Composite {
                });
                bar2.pack();
        }
-       
+       /**
+        * Third tool bar for holding the Annotate combo. 
+        */
        private void createToolbar3() {
                SwtUtils.addLabel(bar3, getAction(Tool.SetLabel).getText());
                comboLabel = SwtUtils.addCombo(bar3, 130, SWT.SIMPLE);
@@ -198,18 +197,24 @@ public class SegmentationView extends Composite {
                        public void keyReleased(KeyEvent e) {
                                comboLabel.remove(0,comboLabel.getItemCount()-1);
                                setLabel(comboLabel.getText());
-                   }
+                           Display.getCurrent().asyncExec(new Runnable() {
+                               public void run() {
+                                       comboLabel.setFocus();
+                                       comboLabel.setText(comboLabel.getText());
+                               }
+                               });
+                       }
                        @Override
                        public void keyPressed(KeyEvent arg0) {
                                // TODO Auto-generated method stub
                        }
                });
-               ToolItem item = new ToolItem(bar3, SWT.SEPARATOR);
+               /*ToolItem item = new ToolItem(bar3, SWT.SEPARATOR);
                assign = new Button(bar3, SWT.PUSH);
                assign.setText("Assign");
                item.setWidth(50);
                item.setControl(assign);
-               bar3.pack();
+               bar3.pack();*/
        }
        
        
@@ -731,7 +736,7 @@ public class SegmentationView extends Composite {
                        Tool.Clear.action.setEnabled(canClear());
                        Tool.AutoApply.action.setChecked(auto);
                        Tool.SegmenterOptions.action.setEnabled(canShowOptions());
-                       
+                                               
                        // Always enabled if view enabled
                        Tool.SetBrushSize.action.setEnabled(true);
                        Tool.SegmenterOptions.action.setEnabled(true);
@@ -772,6 +777,7 @@ public class SegmentationView extends Composite {
                for(int i=0; i<array.length();i++)
                {
                        comboLabel.add(array.getJSONObject(i).getString("title"),i);
+                       comboLabel.setListVisible(true);
                }
                in.close();
            }