From d0bce73e63c3fdf1df58993b7d4bde2e31e6a3a1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 26 Mar 2010 12:22:33 +0000 Subject: [PATCH] fix logic for annotation label popup (still outstanding todo) --- src/jalview/gui/AnnotationLabels.java | 41 +++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 9 deletions(-) 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); -- 1.7.10.2