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
allow an existing alignment annotation row to be bound to a sequenceGroup as its...
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationLabels.java
diff --git
a/src/jalview/gui/AnnotationLabels.java
b/src/jalview/gui/AnnotationLabels.java
index
07a9b03
..
740a13a
100755
(executable)
--- a/
src/jalview/gui/AnnotationLabels.java
+++ b/
src/jalview/gui/AnnotationLabels.java
@@
-1,5
+1,5
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
* Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
* Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
@@
-104,8
+104,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
{
}
{
}
- BufferedImage bi = new BufferedImage(temp.getHeight(this), temp
- .getWidth(this), BufferedImage.TYPE_INT_RGB);
+ BufferedImage bi = new BufferedImage(temp.getHeight(this),
+ temp.getWidth(this), BufferedImage.TYPE_INT_RGB);
Graphics2D g = (Graphics2D) bi.getGraphics();
g.rotate(Math.toRadians(90));
g.drawImage(temp, 0, -bi.getWidth(this), this);
Graphics2D g = (Graphics2D) bi.getGraphics();
g.rotate(Math.toRadians(90));
g.drawImage(temp, 0, -bi.getWidth(this), this);
@@
-450,13
+450,13
@@
public class AnnotationLabels extends JPanel implements MouseListener,
{
if (evt.getClickCount() >= 2)
{
{
if (evt.getClickCount() >= 2)
{
- // todo: make the ap scroll to the selection
+ // todo: make the ap scroll to the selection - not necessary, first click highlights/scrolls, second selects
ap.seqPanel.ap.idPanel.highlightSearchResults(null);
ap.av.setSelectionGroup(// new SequenceGroup(
ap.seqPanel.ap.idPanel.highlightSearchResults(null);
ap.av.setSelectionGroup(// new SequenceGroup(
- aa[selectedRow].groupRef); // );
- ap.av.sendSelection();
+ aa[selectedRow].groupRef); // );
ap.paintAlignment(false);
PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
ap.paintAlignment(false);
PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
+ ap.av.sendSelection();
}
else
{
}
else
{
@@
-550,8
+550,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
"Ignore Gaps In Consensus",
(aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
"Ignore Gaps In Consensus",
(aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef
- .getIgnoreGapsConsensus()
- : ap.av.getIgnoreGapsConsensus());
+ .getIgnoreGapsConsensus() : ap.av
+ .getIgnoreGapsConsensus());
final AlignmentAnnotation aaa = aa[selectedRow];
cbmi.addActionListener(new ActionListener()
{
final AlignmentAnnotation aaa = aa[selectedRow];
cbmi.addActionListener(new ActionListener()
{
@@
-574,8
+574,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
if (aaa.groupRef != null)
{
final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
if (aaa.groupRef != null)
{
final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
- "Show Group Histogram", aa[selectedRow].groupRef
- .isShowConsensusHistogram());
+ "Show Group Histogram",
+ aa[selectedRow].groupRef.isShowConsensusHistogram());
chist.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
chist.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@
-593,8
+593,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
});
pop.add(chist);
final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
});
pop.add(chist);
final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
- "Show Group Logo", aa[selectedRow].groupRef
- .isShowSequenceLogo());
+ "Show Group Logo",
+ aa[selectedRow].groupRef.isShowSequenceLogo());
cprofl.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
cprofl.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@
-690,8
+690,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
String output = new FormatAdapter().formatSequences("Fasta", seqs,
omitHidden);
String output = new FormatAdapter().formatSequences("Fasta", seqs,
omitHidden);
- Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
- new StringSelection(output), Desktop.instance);
+ Toolkit.getDefaultToolkit().getSystemClipboard()
+ .setContents(new StringSelection(output), Desktop.instance);
Vector hiddenColumns = null;
if (av.hasHiddenColumns)
Vector hiddenColumns = null;
if (av.hasHiddenColumns)
@@
-824,8
+824,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
g.setColor(aa[gg].annotations[0].colour);
}
g.setColor(aa[gg].annotations[0].colour);
}
- g.drawLine(x, y - graphExtras - 3, x
- + fm.stringWidth(aa[gg].label), y - graphExtras - 3);
+ g.drawLine(x, y - graphExtras - 3,
+ x + fm.stringWidth(aa[gg].label), y - graphExtras - 3);
g.setColor(Color.black);
graphExtras += fontHeight + 8;
g.setColor(Color.black);
graphExtras += fontHeight + 8;
@@
-846,9
+846,8
@@
public class AnnotationLabels extends JPanel implements MouseListener,
else if (dragEvent != null && aa != null)
{
g.setColor(Color.lightGray);
else if (dragEvent != null && aa != null)
{
g.setColor(Color.lightGray);
- g.drawString(aa[selectedRow].label, dragEvent.getX(), dragEvent
- .getY()
- - scrollOffset);
+ g.drawString(aa[selectedRow].label, dragEvent.getX(),
+ dragEvent.getY() - scrollOffset);
}
if ((aa == null) || (aa.length < 1))
}
if ((aa == null) || (aa.length < 1))