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 branch 'bug/JAL-3103_browser_launcher_problems_macos_and_linux' into develop
[jalview.git]
/
src
/
jalview
/
gui
/
IdCanvas.java
diff --git
a/src/jalview/gui/IdCanvas.java
b/src/jalview/gui/IdCanvas.java
index
4057cef
..
1a8e79f
100755
(executable)
--- a/
src/jalview/gui/IdCanvas.java
+++ b/
src/jalview/gui/IdCanvas.java
@@
-20,10
+20,6
@@
*/
package jalview.gui;
*/
package jalview.gui;
-import jalview.datamodel.SequenceI;
-import jalview.viewmodel.ViewportListenerI;
-import jalview.viewmodel.ViewportRanges;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
@@
-37,6
+33,10
@@
import java.util.List;
import javax.swing.JPanel;
import javax.swing.JPanel;
+import jalview.datamodel.SequenceI;
+import jalview.viewmodel.ViewportListenerI;
+import jalview.viewmodel.ViewportRanges;
+
/**
* DOCUMENT ME!
*
/**
* DOCUMENT ME!
*
@@
-137,7
+137,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
g.drawString(s.getDisplayId(av.getShowJVSuffix()), xPos,
(((i - starty + 1) * charHeight) + ypos) - (charHeight / 5));
g.drawString(s.getDisplayId(av.getShowJVSuffix()), xPos,
(((i - starty + 1) * charHeight) + ypos) - (charHeight / 5));
- if (hiddenRows)
+ if (hiddenRows && av.getShowHiddenMarkers())
{
drawMarker(g, av, i, starty, ypos);
}
{
drawMarker(g, av, i, starty, ypos);
}
@@
-324,6
+324,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
if (hasHiddenRows || alignViewport.isDisplayReferenceSeq())
{
g.setFont(getHiddenFont(sequence, alignViewport));
if (hasHiddenRows || alignViewport.isDisplayReferenceSeq())
{
g.setFont(getHiddenFont(sequence, alignViewport));
+ fm = g.getFontMetrics();
}
// Selected sequence colours
}
// Selected sequence colours
@@
-363,7
+364,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
g.drawString(string, xPos, (((i - startSeq) * charHeight) + charHeight)
- (charHeight / 5));
g.drawString(string, xPos, (((i - startSeq) * charHeight) + charHeight)
- (charHeight / 5));
- if (hasHiddenRows)
+ if (hasHiddenRows && av.getShowHiddenMarkers())
{
drawMarker(g, alignViewport, i, startSeq, 0);
}
{
drawMarker(g, alignViewport, i, startSeq, 0);
}
@@
-384,32
+385,20
@@
public class IdCanvas extends JPanel implements ViewportListenerI
int alignmentWidth = alignViewport.getAlignment().getWidth();
final int alheight = alignViewport.getAlignment().getHeight();
int alignmentWidth = alignViewport.getAlignment().getWidth();
final int alheight = alignViewport.getAlignment().getHeight();
- int annotationHeight = 0;
+ /*
+ * assumption: SeqCanvas.calculateWrappedGeometry has been called
+ */
+ SeqCanvas seqCanvas = alignViewport.getAlignPanel()
+ .getSeqPanel().seqCanvas;
+
+ final int charHeight = alignViewport.getCharHeight();
AnnotationLabels labels = null;
if (alignViewport.isShowAnnotation())
{
AnnotationLabels labels = null;
if (alignViewport.isShowAnnotation())
{
- if (ap == null)
- {
- ap = new AnnotationPanel(alignViewport);
- }
- annotationHeight = ap.adjustPanelHeight();
labels = new AnnotationLabels(alignViewport);
}
labels = new AnnotationLabels(alignViewport);
}
- final int charHeight = alignViewport.getCharHeight();
- int hgap = charHeight;
- if (alignViewport.getScaleAboveWrapped())
- {
- hgap += charHeight;
- }
-
- /*
- * height of alignment + gap + annotations (if shown)
- */
- int cHeight = alheight * charHeight + hgap
- + annotationHeight;
-
ViewportRanges ranges = alignViewport.getRanges();
int rowSize = ranges.getViewportWidth();
ViewportRanges ranges = alignViewport.getRanges();
int rowSize = ranges.getViewportWidth();
@@
-419,7
+408,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
* out of visible space, whichever comes first
*/
boolean hasHiddenRows = alignViewport.hasHiddenRows();
* out of visible space, whichever comes first
*/
boolean hasHiddenRows = alignViewport.hasHiddenRows();
- int ypos = hgap;
+ int ypos = seqCanvas.wrappedSpaceAboveAlignment;
int rowStartRes = ranges.getStartRes();
while ((ypos <= pageHeight) && (rowStartRes < alignmentWidth))
{
int rowStartRes = ranges.getStartRes();
while ((ypos <= pageHeight) && (rowStartRes < alignmentWidth))
{
@@
-444,7
+433,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
g.translate(0, -ypos - (alheight * charHeight));
}
g.translate(0, -ypos - (alheight * charHeight));
}
- ypos += cHeight;
+ ypos += seqCanvas.wrappedRepeatHeightPx;
rowStartRes += rowSize;
}
}
rowStartRes += rowSize;
}
}