git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0c0bb79
)
JAL-4094 shift+click drag up/down to resize all annotation rows with matching calcId...
author
Jim Procter
<j.procter@dundee.ac.uk>
Sat, 29 Oct 2022 14:11:58 +0000
(15:11 +0100)
committer
Jim Procter
<j.procter@dundee.ac.uk>
Sat, 29 Oct 2022 14:11:58 +0000
(15:11 +0100)
src/jalview/gui/AnnotationPanel.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AnnotationPanel.java
b/src/jalview/gui/AnnotationPanel.java
index
d31e52d
..
c3b44ce
100755
(executable)
--- a/
src/jalview/gui/AnnotationPanel.java
+++ b/
src/jalview/gui/AnnotationPanel.java
@@
-150,6
+150,8
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
private MouseWheelListener[] _mwl;
private MouseWheelListener[] _mwl;
+ private boolean notJustOne;
+
/**
* Creates a new AnnotationPanel object.
*
/**
* Creates a new AnnotationPanel object.
*
@@
-776,6
+778,7
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
* mostly vertical drag
*/
dragMode = DragMode.Resize;
* mostly vertical drag
*/
dragMode = DragMode.Resize;
+ notJustOne = evt.isShiftDown();
/*
* but could also be a matrix drag
/*
* but could also be a matrix drag
@@
-816,7
+819,20
@@
public class AnnotationPanel extends JPanel implements AwtRenderPanelI,
AlignmentAnnotation graphAnnotation = av.getAlignment()
.getAlignmentAnnotation()[graphStretch];
int newHeight = Math.max(0, graphAnnotation.graphHeight + deltaY);
AlignmentAnnotation graphAnnotation = av.getAlignment()
.getAlignmentAnnotation()[graphStretch];
int newHeight = Math.max(0, graphAnnotation.graphHeight + deltaY);
- graphAnnotation.graphHeight = newHeight;
+ if (notJustOne)
+ {
+ for (AlignmentAnnotation similar : av.getAlignment()
+ .findAnnotations(null, graphAnnotation.getCalcId(),
+ graphAnnotation.label))
+ {
+ similar.graphHeight = newHeight;
+ }
+
+ }
+ else
+ {
+ graphAnnotation.graphHeight = newHeight;
+ }
adjustPanelHeight();
ap.paintAlignment(false, false);
}
adjustPanelHeight();
ap.paintAlignment(false, false);
}