X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=fdcfacaf47b51f1b76b9587436a699a81c1aa330;hb=caf13e6a9dc82023cd8648420201e5ad60ce0393;hp=8acdcc63000851657cb5f1c5cb868b390ec05358;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 8acdcc6..fdcfaca 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -198,8 +198,8 @@ public class SeqPanel extends JPanel implements MouseListener, y -= hgap; - seq = Math.min((y % cHeight) / av.getCharHeight(), av.alignment - .getHeight() - 1); + seq = Math.min((y % cHeight) / av.getCharHeight(), + av.alignment.getHeight() - 1); } else { @@ -601,7 +601,7 @@ public class SeqPanel extends JPanel implements MouseListener, if (lastMessage == null || !lastMessage.equals(tmp)) { // System.err.println("mouseOver Sequence: "+tmp); - ssm.mouseOverSequence(sequence, index, pos); + ssm.mouseOverSequence(sequence, index, pos, av); } lastMessage = tmp; } @@ -688,8 +688,9 @@ public class SeqPanel extends JPanel implements MouseListener, if (av.showSequenceFeatures) { int rpos; - SequenceFeature[] features = findFeaturesAtRes(sequence - .getDatasetSequence(), rpos = sequence.findPosition(res)); + SequenceFeature[] features = findFeaturesAtRes( + sequence.getDatasetSequence(), + rpos = sequence.findPosition(res)); appendFeatures(tooltipText, linkImageURL.toString(), rpos, features, this.ap.seqPanel.seqCanvas.fr.minmax); } @@ -937,8 +938,7 @@ public class SeqPanel extends JPanel implements MouseListener, // Which is bigger, left-right or up-down? if (Math.abs(evt.getY() - lastMousePress.getY()) > Math.abs(evt - .getX() - - lastMousePress.getX())) + .getX() - lastMousePress.getX())) { int fontSize = av.font.getSize(); @@ -956,9 +956,7 @@ public class SeqPanel extends JPanel implements MouseListener, 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; ap.fontChanged(); } @@ -1443,14 +1441,15 @@ public class SeqPanel extends JPanel implements MouseListener, av.setSelectionGroup(null); } - SequenceFeature[] features = findFeaturesAtRes(sequence - .getDatasetSequence(), sequence.findPosition(findRes(evt))); + SequenceFeature[] features = findFeaturesAtRes( + sequence.getDatasetSequence(), + 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) @@ -1554,8 +1553,8 @@ public class SeqPanel extends JPanel implements MouseListener, if (javax.swing.SwingUtilities.isRightMouseButton(evt)) { - SequenceFeature[] allFeatures = findFeaturesAtRes(sequence - .getDatasetSequence(), sequence.findPosition(res)); + SequenceFeature[] allFeatures = findFeaturesAtRes( + sequence.getDatasetSequence(), sequence.findPosition(res)); Vector links = new Vector(); for (int i = 0; i < allFeatures.length; i++) { @@ -1641,20 +1640,20 @@ public class SeqPanel extends JPanel implements MouseListener, { 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.conservationApplied()) { - SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup - .getName()); + SliderPanel.setConservationSlider(ap, stretchGroup.cs, + stretchGroup.getName()); } else { - SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup - .getName()); + SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, + stretchGroup.getName()); } } PaintRefresher.Refresh(this, av.getSequenceSetId()); @@ -1883,8 +1882,9 @@ public class SeqPanel extends JPanel implements MouseListener, } // do we want to thread this ? (contention with seqsel and colsel locks, I // suspect) - // rules are: colsel is copied if there is a real intersection between sequence selection - boolean repaint = false,copycolsel=true; + // rules are: colsel is copied if there is a real intersection between + // sequence selection + boolean repaint = false, copycolsel = true; if (av.selectionGroup == null || !av.isSelectionGroupChanged()) { SequenceGroup sgroup = null; @@ -1899,10 +1899,11 @@ public class SeqPanel extends JPanel implements MouseListener, } sgroup = seqsel.intersect(av.alignment, (av.hasHiddenRows) ? av.hiddenRepSequences : null); - if ((sgroup==null || sgroup.getSize()==0) && (colsel==null || colsel.size()==0)) + if ((sgroup == null || sgroup.getSize() == 0) + && (colsel == null || colsel.size() == 0)) { // don't copy columns if the region didn't intersect. - copycolsel=false; + copycolsel = false; } } if (sgroup != null && sgroup.getSize() > 0)