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:
eae0a6c
)
check annotation label widths as well as id widths
author
amwaterhouse
<Andrew Waterhouse>
Thu, 7 Apr 2005 16:59:48 +0000
(16:59 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Thu, 7 Apr 2005 16:59:48 +0000
(16:59 +0000)
src/jalview/gui/AlignmentPanel.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AlignmentPanel.java
b/src/jalview/gui/AlignmentPanel.java
index
75729c3
..
c38b7dc
100755
(executable)
--- a/
src/jalview/gui/AlignmentPanel.java
+++ b/
src/jalview/gui/AlignmentPanel.java
@@
-156,6
+156,20
@@
public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
i++;
\r
}
\r
\r
+ // Also check annotation label widths
\r
+ i=0;
\r
+ if(al.getAlignmentAnnotation()!=null)
\r
+ {
\r
+ fm = g.getFontMetrics(alabels.getFont());
\r
+ while (i < al.getAlignmentAnnotation().length)
\r
+ {
\r
+ String label = al.getAlignmentAnnotation()[i].label;
\r
+ if (fm.stringWidth(label) > idWidth)
\r
+ idWidth = fm.stringWidth(label);
\r
+ i++;
\r
+ }
\r
+ }
\r
+
\r
return new Dimension(idWidth, 12);
\r
}
\r
\r