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-3364 tweaks to override of FIGURE_FIXEDIDWIDTH for split frame image
[jalview.git]
/
src
/
jalview
/
renderer
/
AnnotationRenderer.java
diff --git
a/src/jalview/renderer/AnnotationRenderer.java
b/src/jalview/renderer/AnnotationRenderer.java
index
41772d4
..
dcf2f20
100644
(file)
--- a/
src/jalview/renderer/AnnotationRenderer.java
+++ b/
src/jalview/renderer/AnnotationRenderer.java
@@
-162,7
+162,8
@@
public class AnnotationRenderer
boolean validRes, boolean validEnd)
{
g.setColor(STEM_COLOUR);
boolean validRes, boolean validEnd)
{
g.setColor(STEM_COLOUR);
- int sCol = (lastSSX / charWidth) + startRes;
+ int sCol = (lastSSX / charWidth)
+ + hiddenColumns.visibleToAbsoluteColumn(startRes);
int x1 = lastSSX;
int x2 = (x * charWidth);
int x1 = lastSSX;
int x2 = (x * charWidth);
@@
-228,7
+229,8
@@
public class AnnotationRenderer
// System.out.println(nonCanColor);
g.setColor(nonCanColor);
// System.out.println(nonCanColor);
g.setColor(nonCanColor);
- int sCol = (lastSSX / charWidth) + startRes;
+ int sCol = (lastSSX / charWidth)
+ + hiddenColumns.visibleToAbsoluteColumn(startRes);
int x1 = lastSSX;
int x2 = (x * charWidth);
int x1 = lastSSX;
int x2 = (x * charWidth);
@@
-417,6
+419,8
@@
public class AnnotationRenderer
boolean rna = false;
boolean rna = false;
+ private int lastDrawnHeight;
+
/**
* Render the annotation rows associated with an alignment.
*
/**
* Render the annotation rows associated with an alignment.
*
@@
-600,7
+604,7
@@
public class AnnotationRenderer
{
if (hasHiddenColumns)
{
{
if (hasHiddenColumns)
{
- column = hiddenColumns.adjustForHiddenColumns(startRes + x);
+ column = hiddenColumns.visibleToAbsoluteColumn(startRes + x);
if (column > row_annotations.length - 1)
{
break;
if (column > row_annotations.length - 1)
{
break;
@@
-1091,11
+1095,22
@@
public class AnnotationRenderer
System.err.println("Annotation Rendering time:"
+ (System.currentTimeMillis() - stime));
}
System.err.println("Annotation Rendering time:"
+ (System.currentTimeMillis() - stime));
}
- ;
+ lastDrawnHeight = y;
return !usedFaded;
}
return !usedFaded;
}
+ /**
+ * Answers the height in pixels of what was drawn on the graphics in the last
+ * call to {@code drawComponent}
+ *
+ * @return
+ */
+ public int getLastDrawnHeight()
+ {
+ return lastDrawnHeight;
+ }
+
public static final Color GLYPHLINE_COLOR = Color.gray;
public static final Color SHEET_COLOUR = Color.green;
public static final Color GLYPHLINE_COLOR = Color.gray;
public static final Color SHEET_COLOUR = Color.green;
@@
-1147,7
+1162,8
@@
public class AnnotationRenderer
{
g.setColor(HELIX_COLOUR);
{
g.setColor(HELIX_COLOUR);
- int sCol = (lastSSX / charWidth) + startRes;
+ int sCol = (lastSSX / charWidth)
+ + hiddenColumns.visibleToAbsoluteColumn(startRes);
int x1 = lastSSX;
int x2 = (x * charWidth);
int x1 = lastSSX;
int x2 = (x * charWidth);
@@
-1247,7
+1263,7
@@
public class AnnotationRenderer
column = sRes + x;
if (hasHiddenColumns)
{
column = sRes + x;
if (hasHiddenColumns)
{
- column = hiddenColumns.adjustForHiddenColumns(column);
+ column = hiddenColumns.visibleToAbsoluteColumn(column);
}
if (column > aaMax)
}
if (column > aaMax)
@@
-1327,7
+1343,7
@@
public class AnnotationRenderer
column = sRes + x;
if (hasHiddenColumns)
{
column = sRes + x;
if (hasHiddenColumns)
{
- column = hiddenColumns.adjustForHiddenColumns(column);
+ column = hiddenColumns.visibleToAbsoluteColumn(column);
}
if (column > aaMax)
}
if (column > aaMax)