Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
updated list of termDetailTable items to build from an enum (up in declarations)
authorpreecej <preecej@localhost>
Tue, 31 Jan 2012 01:33:35 +0000 (01:33 +0000)
committerpreecej <preecej@localhost>
Tue, 31 Jan 2012 01:33:35 +0000 (01:33 +0000)
svn path=/; revision=288

Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java

index 1359f80b8bc5d1a8160973806d23c8c45d9a66ae..209f5382be5493cd5cbe80a266c006025ea9f433 100644 (file)
@@ -117,6 +117,14 @@ public class SegmentationView extends Composite {
                private ToolAction action;
        };
        
+       public enum termDetailLabels {
+               n("Name"), a("Accession ID"), b("Branch") /* a.k.a. "Aspect" */, d("Definition"), c("Comment"), s("Synonyms");
+               final String extendedLabel;
+               termDetailLabels(String extendedLabel) {
+                       this.extendedLabel = extendedLabel;
+        }
+    };
+
        // constructor
        public SegmentationView(Properties props, Composite parent, int style) {
                super(parent, style);
@@ -303,38 +311,13 @@ public class SegmentationView extends Composite {
                        column.setText (titles [i]);
                }
 
-               TableItem item1 = new TableItem (termDetailTable, SWT.NONE);
-               item1.setText (0, "Name");
-               item1.setText (1, "");
-
-               TableItem item2 = new TableItem (termDetailTable, SWT.NONE);
-               item2.setText (0, "Accession ID");
-               item2.setText (1, "");
-
-               TableItem item3 = new TableItem (termDetailTable, SWT.NONE);
-               item3.setText (0, "Branch"); // a.k.a. "Aspect"
-               item3.setText (1, "");
-
-               TableItem item4 = new TableItem (termDetailTable, SWT.NONE);
-               item4.setText (0, "Definition");
-               item4.setText (1, "");
-
-               TableItem item5 = new TableItem (termDetailTable, SWT.NONE);
-               item5.setText (0, "Comment");
-               item5.setText (1, "");
-
-               TableItem item6 = new TableItem (termDetailTable, SWT.NONE);
-               item6.setText (0, "Synonyms");
-               item6.setText (1, "");
-
-               /*
-               int count = 6;
-               for (int i=0; i<count; i++) {
+               termDetailLabels[] values = termDetailLabels.values();
+               for (termDetailLabels code : values) {
                        TableItem item = new TableItem (termDetailTable, SWT.NONE);
-                       item.setText (0, detailLabel[i]);
+                       item.setText (0, code.extendedLabel);
                        item.setText (1, "");
                }
-               */
+
                for (int i=0; i<titles.length; i++) {
                        termDetailTable.getColumn (i).pack ();
                }