if (labels != null && alignViewport.isShowAnnotation())
{
+ int thisIdWidth = getWidth();
g.translate(0, ypos + (alheight * charHeight));
- int getAnnotationsIdWidth = labels.drawLabels(g, false, -1, false,
- null);
- int thisIdWidth = idWidth < 0 ? getAnnotationsIdWidth : idWidth;
- if (thisIdWidth > getWidth())
+ if (!manuallyAdjusted())
{
- this.setPreferredSize(
- new Dimension(this.getHeight(), thisIdWidth));
- this.repaint();
+ int getAnnotationsIdWidth = labels.drawLabels(g, false, -1, false,
+ null);
+ thisIdWidth = idWidth < 0 ? getAnnotationsIdWidth : idWidth;
+ if (thisIdWidth > getWidth())
+ {
+ this.setPreferredSize(
+ new Dimension(this.getHeight(), thisIdWidth));
+ this.repaint();
+ }
}
labels.drawComponent(g, false, thisIdWidth);
g.translate(0, -ypos - (alheight * charHeight));
repaint();
}
}
+
+ private boolean manuallyAdjusted = false;
+
+ public boolean manuallyAdjusted()
+ {
+ return manuallyAdjusted;
+ }
+
+ public void setManuallyAdjusted(boolean b)
+ {
+ manuallyAdjusted = b;
+ }
}
AlignmentPanel ap;
- private boolean manuallyAdjusted = false;
-
/**
* Creates a new IdwidthAdjuster object.
*
ap.validateAnnotationDimensions(false);
ap.paintAlignment(true, false);
- manuallyAdjusted = true;
+ ap.getIdPanel().getIdCanvas().setManuallyAdjusted(true);
}
public void setWidth(int newWidth)
public boolean manuallyAdjusted()
{
- return manuallyAdjusted;
+ return ap.getIdPanel().getIdCanvas().manuallyAdjusted();
}
@Override