From: jprocter Date: Fri, 26 Mar 2010 12:22:33 +0000 (+0000) Subject: fix logic for annotation label popup (still outstanding todo) X-Git-Tag: Release_2_5~112 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d0bce73e63c3fdf1df58993b7d4bde2e31e6a3a1;p=jalview.git fix logic for annotation label popup (still outstanding todo) --- diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 1b5ab83..3bf915a 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -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);