fix logic for annotation label popup (still outstanding todo)
authorjprocter <Jim Procter>
Fri, 26 Mar 2010 12:22:33 +0000 (12:22 +0000)
committerjprocter <Jim Procter>
Fri, 26 Mar 2010 12:22:33 +0000 (12:22 +0000)
src/jalview/gui/AnnotationLabels.java

index 1b5ab83..3bf915a 100755 (executable)
@@ -499,15 +499,17 @@ public class AnnotationLabels extends JPanel implements MouseListener,
     // TODO: annotation object should be typed for autocalculated/derived property methods
     if (selectedRow < aa.length)
     {
-      if (!aa[selectedRow].autoCalculated && aa[selectedRow].graph==AlignmentAnnotation.NO_GRAPH)
-      {
-        // display formatting settings for this row.
-        pop.addSeparator();
-        // av and sequencegroup need to implement same interface for
-        item = new JCheckBoxMenuItem(TOGGLE_LABELSCALE,
+      if (!aa[selectedRow].autoCalculated) {
+        if (aa[selectedRow].graph==AlignmentAnnotation.NO_GRAPH)
+        {
+          // display formatting settings for this row.
+          pop.addSeparator();
+          // av and sequencegroup need to implement same interface for
+          item = new JCheckBoxMenuItem(TOGGLE_LABELSCALE,
                 aa[selectedRow].scaleColLabel);
-        item.addActionListener(this);
-        pop.add(item);
+          item.addActionListener(this);
+          pop.add(item);
+        }
       }
       else if (aa[selectedRow].label.indexOf("Consensus") > -1)
       {
@@ -553,10 +555,31 @@ public class AnnotationLabels extends JPanel implements MouseListener,
               // can be
               // updated.
               aaa.groupRef.setIncludeAllConsSymbols(cprof.getState());
-              ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+              ap.repaint();
+              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
             }
           });
           pop.add(cprof);
+        } else {
+/*          final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
+                  "Show Full Profile", aa[selectedRow].groupRef
+                          .isIncludeAllConsSymbols());
+          cprof.addActionListener(new ActionListener()
+          {
+            public void actionPerformed(ActionEvent e)
+            {
+              // TODO: pass on reference
+              // to ap
+              // so the
+              // view
+              // can be
+              // updated.
+              aaa.groupRef.setIncludeAllConsSymbols(cprof.getState());
+              ap.repaint();
+              // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+            }
+          });
+          pop.add(cprof);       */   
         }
         final JMenuItem consclipbrd = new JMenuItem(COPYCONS_SEQ);
         consclipbrd.addActionListener(this);