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
JAL-1683 replace year/version strings with tokens in source
[jalview.git]
/
src
/
jalview
/
gui
/
IdPanel.java
diff --git
a/src/jalview/gui/IdPanel.java
b/src/jalview/gui/IdPanel.java
index
6b1109a
..
6aad6c5
100755
(executable)
--- a/
src/jalview/gui/IdPanel.java
+++ b/
src/jalview/gui/IdPanel.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-52,7
+52,7
@@
import javax.swing.ToolTipManager;
public class IdPanel extends JPanel implements MouseListener,
MouseMotionListener, MouseWheelListener
{
public class IdPanel extends JPanel implements MouseListener,
MouseMotionListener, MouseWheelListener
{
- protected IdCanvas idCanvas;
+ private IdCanvas idCanvas;
protected AlignViewport av;
protected AlignViewport av;
@@
-81,11
+81,11
@@
public class IdPanel extends JPanel implements MouseListener,
{
this.av = av;
alignPanel = parent;
{
this.av = av;
alignPanel = parent;
- idCanvas = new IdCanvas(av);
+ setIdCanvas(new IdCanvas(av));
linkImageURL = getClass().getResource("/images/link.gif").toString();
seqAnnotReport = new SequenceAnnotationReport(linkImageURL);
setLayout(new BorderLayout());
linkImageURL = getClass().getResource("/images/link.gif").toString();
seqAnnotReport = new SequenceAnnotationReport(linkImageURL);
setLayout(new BorderLayout());
- add(idCanvas, BorderLayout.CENTER);
+ add(getIdCanvas(), BorderLayout.CENTER);
addMouseListener(this);
addMouseMotionListener(this);
addMouseWheelListener(this);
addMouseListener(this);
addMouseMotionListener(this);
addMouseWheelListener(this);
@@
-102,7
+102,7
@@
public class IdPanel extends JPanel implements MouseListener,
@Override
public void mouseMoved(MouseEvent e)
{
@Override
public void mouseMoved(MouseEvent e)
{
- SeqPanel sp = alignPanel.seqPanel;
+ SeqPanel sp = alignPanel.getSeqPanel();
int seq = Math.max(0, sp.findSeq(e));
if (seq > -1 && seq < av.getAlignment().getHeight())
{
int seq = Math.max(0, sp.findSeq(e));
if (seq > -1 && seq < av.getAlignment().getHeight())
{
@@
-111,7
+111,7
@@
public class IdPanel extends JPanel implements MouseListener,
seqAnnotReport
.createSequenceAnnotationReport(tip, sequence,
av.isShowDbRefs(), av.isShowNpFeats(),
seqAnnotReport
.createSequenceAnnotationReport(tip, sequence,
av.isShowDbRefs(), av.isShowNpFeats(),
- sp.seqCanvas.fr.minmax);
+ sp.seqCanvas.fr.getMinMax());
setToolTipText("<html>" + sequence.getDisplayId(true) + " "
+ tip.toString() + "</html>");
}
setToolTipText("<html>" + sequence.getDisplayId(true) + " "
+ tip.toString() + "</html>");
}
@@
-128,7
+128,7
@@
public class IdPanel extends JPanel implements MouseListener,
{
mouseDragging = true;
{
mouseDragging = true;
- int seq = Math.max(0, alignPanel.seqPanel.findSeq(e));
+ int seq = Math.max(0, alignPanel.getSeqPanel().findSeq(e));
if (seq < lastid)
{
if (seq < lastid)
{
@@
-202,7
+202,7
@@
public class IdPanel extends JPanel implements MouseListener,
return;
}
return;
}
- int seq = alignPanel.seqPanel.findSeq(e);
+ int seq = alignPanel.getSeqPanel().findSeq(e);
String url = null;
int i = 0;
String id = av.getAlignment().getSequenceAt(seq).getName();
String url = null;
int i = 0;
String id = av.getAlignment().getSequenceAt(seq).getName();
@@
-315,7
+315,7
@@
public class IdPanel extends JPanel implements MouseListener,
return;
}
return;
}
- int seq = alignPanel.seqPanel.findSeq(e);
+ int seq = alignPanel.getSeqPanel().findSeq(e);
if (SwingUtilities.isRightMouseButton(e))
{
if (SwingUtilities.isRightMouseButton(e))
{
@@
-443,7
+443,7
@@
public class IdPanel extends JPanel implements MouseListener,
*/
public void highlightSearchResults(List<SequenceI> list)
{
*/
public void highlightSearchResults(List<SequenceI> list)
{
- idCanvas.setHighlighted(list);
+ getIdCanvas().setHighlighted(list);
if (list == null)
{
if (list == null)
{
@@
-459,6
+459,16
@@
public class IdPanel extends JPanel implements MouseListener,
}
}
}
}
+ public IdCanvas getIdCanvas()
+ {
+ return idCanvas;
+ }
+
+ public void setIdCanvas(IdCanvas idCanvas)
+ {
+ this.idCanvas = idCanvas;
+ }
+
// this class allows scrolling off the bottom of the visible alignment
class ScrollThread extends Thread
{
// this class allows scrolling off the bottom of the visible alignment
class ScrollThread extends Thread
{