X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FSeqPanel.java;h=24f478632136404c0c4a3247b42015b6fcfb9dda;hb=a7168a947828a74899fff98c5f4f59515f60432a;hp=28fe5a8567d6dfb8c1d6d63a5d2df276e6a7c64d;hpb=2de8acfae59aced665e4c37ad0f7dcc2ed68818e;p=jalview.git diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 28fe5a8..24f4786 100755 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) + * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program 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. + * Jalview is free software: you can redistribute it and/or + * 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. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * 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 . */ package jalview.appletgui; @@ -465,14 +464,14 @@ public class SeqPanel extends Panel implements MouseMotionListener, av.setSelectionGroup(null); } - SequenceFeature[] features = findFeaturesAtRes(sequence, sequence - .findPosition(findRes(evt))); + SequenceFeature[] features = findFeaturesAtRes(sequence, + sequence.findPosition(findRes(evt))); if (features != null && features.length > 0) { SearchResults highlight = new SearchResults(); - highlight.addResult(sequence, features[0].getBegin(), features[0] - .getEnd()); + highlight.addResult(sequence, features[0].getBegin(), + features[0].getEnd()); seqCanvas.highlightSearchResults(highlight); } if (features != null && features.length > 0) @@ -581,8 +580,8 @@ public class SeqPanel extends Panel implements MouseMotionListener, y -= hgap; - seq = Math.min((y % cHeight) / av.getCharHeight(), av.alignment - .getHeight() - 1); + seq = Math.min((y % cHeight) / av.getCharHeight(), + av.alignment.getHeight() - 1); if (seq < 0) { seq = -1; @@ -641,7 +640,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, { seqCanvas.highlightSearchResults(results); if (av.followHighlight) - { + { ap.scrollToPosition(results); } } @@ -735,8 +734,8 @@ public class SeqPanel extends Panel implements MouseMotionListener, } // use aa to see if the mouse pointer is on a - SequenceFeature[] allFeatures = findFeaturesAtRes(sequence, sequence - .findPosition(res)); + SequenceFeature[] allFeatures = findFeaturesAtRes(sequence, + sequence.findPosition(res)); int index = 0; while (index < allFeatures.length) @@ -837,9 +836,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, fontSize = 1; } - av - .setFont(new Font(av.font.getName(), av.font.getStyle(), - fontSize)); + av.setFont(new Font(av.font.getName(), av.font.getStyle(), fontSize)); av.charWidth = oldWidth; } else @@ -1349,8 +1346,8 @@ public class SeqPanel extends Panel implements MouseMotionListener, // DETECT RIGHT MOUSE BUTTON IN AWT if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) { - SequenceFeature[] allFeatures = findFeaturesAtRes(sequence, sequence - .findPosition(res)); + SequenceFeature[] allFeatures = findFeaturesAtRes(sequence, + sequence.findPosition(res)); Vector links = null; if (allFeatures != null) @@ -1359,13 +1356,13 @@ public class SeqPanel extends Panel implements MouseMotionListener, { if (allFeatures[i].links != null) { - if (links==null) - { + if (links == null) + { links = new Vector(); } for (int j = 0; j < allFeatures[i].links.size(); j++) { - links.addElement(allFeatures[i].links.elementAt(j)); + links.addElement(allFeatures[i].links.elementAt(j)); } } } @@ -1421,9 +1418,9 @@ public class SeqPanel extends Panel implements MouseMotionListener, { if (stretchGroup.cs instanceof ClustalxColourScheme) { - ((ClustalxColourScheme) stretchGroup.cs).resetClustalX(stretchGroup - .getSequences(av.hiddenRepSequences), stretchGroup - .getWidth()); + ((ClustalxColourScheme) stretchGroup.cs).resetClustalX( + stretchGroup.getSequences(av.hiddenRepSequences), + stretchGroup.getWidth()); } if (stretchGroup.cs instanceof Blosum62ColourScheme @@ -1436,14 +1433,14 @@ public class SeqPanel extends Panel implements MouseMotionListener, if (stretchGroup.cs.conservationApplied()) { - SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup - .getName()); + SliderPanel.setConservationSlider(ap, stretchGroup.cs, + stretchGroup.getName()); stretchGroup.recalcConservation(); } else { - SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup - .getName()); + SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, + stretchGroup.getName()); } } changeEndRes = false;