X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FScalePanel.java;h=ca3faf8542713b4edc9de4bff65ed7401628e53c;hp=a6b4b49a0bc48618296fd6e299a39edf97b45eb6;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hpb=e7338a61f3ce96dadf44ac80b2b32cc5ba4b94c8 diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index a6b4b49..ca3faf8 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -187,7 +187,8 @@ public class ScalePanel extends JPanel }); pop.add(item); - if (av.getAlignment().getHiddenColumns().hasMultiHiddenColumnRegions()) + if (av.getAlignment().getHiddenColumns() + .hasMultiHiddenColumnRegions()) { item = new JMenuItem(MessageManager.getString("action.reveal_all")); item.addActionListener(new ActionListener() @@ -287,8 +288,7 @@ public class ScalePanel extends JPanel // todo res calculation should be a method on AlignViewport int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates ViewportRanges ranges = av.getRanges(); - int res = (xCords / av.getCharWidth()) - + ranges.getStartRes(); + int res = (xCords / av.getCharWidth()) + ranges.getStartRes(); res = Math.min(res, ranges.getEndRes()); if (av.hasHiddenColumns()) { @@ -435,7 +435,7 @@ public class ScalePanel extends JPanel @Override public void paintComponent(Graphics g) { - //super.paintComponent(g); // BH 2019 + // super.paintComponent(g); // BH 2019 /* * shouldn't get called in wrapped mode as the scale above is @@ -523,10 +523,11 @@ public class ScalePanel extends JPanel gg.fillPolygon( new int[] - { -1 + res * avCharWidth - avCharHeight / 4, - -1 + res * avCharWidth + avCharHeight / 4, - -1 + res * avCharWidth }, new int[] - { y, y, y + 2 * yOf }, 3); + { -1 + res * avCharWidth - avCharHeight / 4, + -1 + res * avCharWidth + avCharHeight / 4, + -1 + res * avCharWidth }, + new int[] + { y, y, y + 2 * yOf }, 3); } } } @@ -577,10 +578,11 @@ public class ScalePanel extends JPanel || evt.getPropertyName().equals(ViewportRanges.MOVE_VIEWPORT)) { // scroll event, repaint panel - - // Call repaint on alignment panel so that repaints from other alignment - // panel components can be aggregated. Otherwise performance of the overview - // window and others may be adversely affected. + + // Call repaint on alignment panel so that repaints from other alignment + // panel components can be aggregated. Otherwise performance of the + // overview + // window and others may be adversely affected. av.getAlignPanel().repaint(); } }