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-244 Allow adjusting Id column width in wrap mode. Set Id column width in gui...
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationLabels.java
diff --git
a/src/jalview/gui/AnnotationLabels.java
b/src/jalview/gui/AnnotationLabels.java
index
afee3d0
..
241e0a3
100755
(executable)
--- a/
src/jalview/gui/AnnotationLabels.java
+++ b/
src/jalview/gui/AnnotationLabels.java
@@
-1206,6
+1206,7
@@
public class AnnotationLabels extends JPanel
Graphics dummy = g2d.create();
int newAnnotationIdWidth = drawLabels(dummy, clip, width, false,
null);
Graphics dummy = g2d.create();
int newAnnotationIdWidth = drawLabels(dummy, clip, width, false,
null);
+ dummy.dispose();
Dimension d = ap.calculateDefaultAlignmentIdWidth();
int alignmentIdWidth = d.width;
if (iwa != null && !iwa.manuallyAdjusted())
Dimension d = ap.calculateDefaultAlignmentIdWidth();
int alignmentIdWidth = d.width;
if (iwa != null && !iwa.manuallyAdjusted())
@@
-1230,6
+1231,14
@@
public class AnnotationLabels extends JPanel
}
}
}
}
}
}
+ else
+ {
+ Graphics2D g2d = (Graphics2D) g;
+ Graphics dummy = g2d.create();
+ int newAnnotationIdWidth = drawLabels(dummy, clip, width, false,
+ null);
+ width = Math.max(newAnnotationIdWidth, givenWidth);
+ }
drawLabels(g, clip, width, true, null);
}
drawLabels(g, clip, width, true, null);
}
@@
-1255,7
+1264,7
@@
public class AnnotationLabels extends JPanel
boolean actuallyDraw, FontMetrics fmetrics)
{
int actualWidth = 0;
boolean actuallyDraw, FontMetrics fmetrics)
{
int actualWidth = 0;
- if (actuallyDraw && g != null)
+ if (g != null)
{
if (av.getFont().getSize() < 10)
{
{
if (av.getFont().getSize() < 10)
{