git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge
[jalview.git]
/
src
/
jalview
/
gui
/
ScalePanel.java
diff --git
a/src/jalview/gui/ScalePanel.java
b/src/jalview/gui/ScalePanel.java
index
b2c9a12
..
3ab681c
100755
(executable)
--- a/
src/jalview/gui/ScalePanel.java
+++ b/
src/jalview/gui/ScalePanel.java
@@
-39,7
+39,6
@@
import java.awt.event.MouseMotionListener;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
-import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
import javax.swing.ToolTipManager;
/**
@@
-107,7
+106,7
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
min = res;
max = res;
min = res;
max = res;
- if (SwingUtilities.isRightMouseButton(evt))
+ if (evt.isPopupTrigger())
{
rightMouseButtonPressed(evt, res);
}
{
rightMouseButtonPressed(evt, res);
}
@@
-467,6
+466,9
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
for (int sel : cs.getSelected())
{
for (int sel : cs.getSelected())
{
+ // TODO: JAL-2001 - provide a fast method to list visible selected in a
+ // given range
+
if (av.hasHiddenColumns())
{
if (cs.isVisible(sel))
if (av.hasHiddenColumns())
{
if (cs.isVisible(sel))
@@
-490,6
+492,7
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
gg.setColor(Color.black);
int scalestartx = (startx / 10) * 10;
gg.setColor(Color.black);
int scalestartx = (startx / 10) * 10;
+ int widthx = 1 + endx - startx;
FontMetrics fm = gg.getFontMetrics(av.getFont());
int y = avCharHeight - fm.getDescent();
FontMetrics fm = gg.getFontMetrics(av.getFont());
int y = avCharHeight - fm.getDescent();
@@
-537,11
+540,10
@@
public class ScalePanel extends JPanel implements MouseMotionListener,
for (int i = 0; i < av.getColumnSelection().getHiddenColumns()
.size(); i++)
{
for (int i = 0; i < av.getColumnSelection().getHiddenColumns()
.size(); i++)
{
-
res = av.getColumnSelection().findHiddenRegionPosition(i)
- startx;
res = av.getColumnSelection().findHiddenRegionPosition(i)
- startx;
- if (res < 0 || res > endx - scalestartx)
+ if (res < 0 || res > widthx)
{
continue;
}
{
continue;
}