X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FIdPanel.java;h=97e33668633e43c95bcf89f7f1df6208bddb4213;hb=198b791b7e6c5f3924ecbd4c7b36f63cca9cbc24;hp=7a2ecf769c989a0f7f4167efea398fffc39e586b;hpb=48b925b3dd950c86b1add0f2a90a2d0f8b6e316e;p=jalview.git diff --git a/src/jalview/gui/IdPanel.java b/src/jalview/gui/IdPanel.java index 7a2ecf7..97e3366 100755 --- a/src/jalview/gui/IdPanel.java +++ b/src/jalview/gui/IdPanel.java @@ -1,19 +1,20 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle - * + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Copyright (C) 2014 The Jalview Authors + * * This file is part of Jalview. - * + * * Jalview is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License + * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * - * Jalview is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.gui; @@ -30,7 +31,7 @@ import jalview.util.UrlLink; /** * DOCUMENT ME! - * + * * @author $author$ * @version $Revision$ */ @@ -53,11 +54,12 @@ public class IdPanel extends JPanel implements MouseListener, int lastid = -1; boolean mouseDragging = false; + private final SequenceAnnotationReport seqAnnotReport; /** * Creates a new IdPanel object. - * + * * @param av * DOCUMENT ME! * @param parent @@ -77,9 +79,10 @@ public class IdPanel extends JPanel implements MouseListener, addMouseWheelListener(this); ToolTipManager.sharedInstance().registerComponent(this); } + /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -92,17 +95,18 @@ public class IdPanel extends JPanel implements MouseListener, { SequenceI sequence = av.getAlignment().getSequenceAt(seq); StringBuffer tip = new StringBuffer(); - seqAnnotReport.createSequenceAnnotationReport(tip, sequence, - av.isShowDbRefs(), av.isShowNpFeats(), - sp.seqCanvas.fr.minmax); + seqAnnotReport + .createSequenceAnnotationReport(tip, sequence, + av.isShowDbRefs(), av.isShowNpFeats(), + sp.seqCanvas.fr.minmax); setToolTipText("" + sequence.getDisplayId(true) + " " - + tip.toString()+""); + + tip.toString() + ""); } } /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -135,8 +139,10 @@ public class IdPanel extends JPanel implements MouseListener, if (e.isShiftDown()) { alignPanel.scrollRight(true); - - } else { + + } + else + { alignPanel.scrollUp(false); } } @@ -145,7 +151,9 @@ public class IdPanel extends JPanel implements MouseListener, if (e.isShiftDown()) { alignPanel.scrollRight(false); - } else { + } + else + { alignPanel.scrollUp(true); } } @@ -153,7 +161,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -226,7 +234,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -241,7 +249,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -267,7 +275,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -287,7 +295,8 @@ public class IdPanel extends JPanel implements MouseListener, // build a new links menu based on the current links + any non-positional // features Vector nlinks = new Vector(Preferences.sequenceURLLinks); - SequenceFeature sf[] = sq==null ? null : sq.getDatasetSequence().getSequenceFeatures(); + SequenceFeature sf[] = sq == null ? null : sq.getDatasetSequence() + .getSequenceFeatures(); for (int sl = 0; sf != null && sl < sf.length; sl++) { if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0) @@ -331,7 +340,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param seq * DOCUMENT ME! */ @@ -345,7 +354,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param start * DOCUMENT ME! * @param end @@ -376,13 +385,13 @@ public class IdPanel extends JPanel implements MouseListener, for (int i = start; i <= end; i++) { av.getSelectionGroup().addSequence( - av.getAlignment().getSequenceAt(i), i==end); + av.getAlignment().getSequenceAt(i), i == end); } } /** * DOCUMENT ME! - * + * * @param e * DOCUMENT ME! */ @@ -402,7 +411,7 @@ public class IdPanel extends JPanel implements MouseListener, /** * DOCUMENT ME! - * + * * @param list * DOCUMENT ME! */